Bouraq - the Moroccan high speed service - runs Casablanca to Tangier. It's based on the French TGV so analogous to a bullet train. Regular trains are decent but do pay for first, it's generally only a few dollars more
Other than Marrakech, my top pick would be be Fez and Meknes for more history, souk life and fewer tourists. Casablanca is worth a day but not more. Rabat is an easy day trip and is quite cute but again no more than a day. Tangier is pretty interesting and worth an overnight stay. It used to be a really horrible place to visit, insane hustling and hassle but now is largely drama free. There are lots of scenic delights further south in the mountains and on the coast but that will need a car or bus travel. If you are happy with one of those options, Essaouria, Tagazhout, Tamraght, Taroudant, the Sahara, the Atlas Mountains are all there along with many others.