I went to Marrakesh for the first time last year, and I could literally write a book about it! Words cannot express!! LOL, I do mean that in a good way, but also in a "prepare yourself" way.
I was with my dad, my sister, my aunt and my cousin, so of course my experience will be different because I wasn't alone and I was with a male. But just a couple suggestions:
In Marrakesh, we stayed in the New City and I recommend that. It's more modern and a good break from the intensity of the Medina and Old City. Where we stayed was within walking distance of the Jemma el-Fna (25-30 minutes), but was right near a mall, a McDonalds and some really nice shops.
I never once felt unsafe. However, having said that, you do have to be on guard - more against scams and petty theft than anything else. There are so many people trying to sell you something, or bargain on something, or guide you somewhere, and my best advice is to be kind, yet firm, whenever you simply aren't interested. If you are too nice, you'll end up being led all over the place by a random stranger, while he takes you to every shop and stall he knows, expecting you to buy from his friends and then pay him for services you never asked for. Again, it's not a matter of being safe, but you can get suckered real quick if you aren't on guide. I found the people for be very friendly and hospitable and respectful, especially when I busted out my entire 10-word Arabic vocabulary. it went a long way!!!!
I am normally not a tourist type person - I like the "live like a local" experience, but I sure enough was down for a camel ride!! We sued Get Your Guide to book it the day before and it was AWESOME!!!!!!!!!! We also used Time-Out Marrakesh Excursions to take a day trip to Ouzoud Falls which was also an awesome experience.
I hope you have a fantastic trip!