Where should modal content be placed? I would like to create modals for special offers and promotions. I know how to open them either using drupal.dialog or OpenModalDialogCommand. This works fine.

But what is the best place to put the content for the modal? I started adding it in the JS with .appendTo('body'). This works, but the modal content is complex and contains a lot of elements. I would like to know wheter there is a better place to put this modal content?
There are couple of things you could consider before deciding on a particular approach. 


Is this data static? 


If yes, then you could store data in memory and retrieve as needed. Performance should no longer be an issue as our js libraries are being loaded on demand and I am sure there are many other ways to optimize your code to work for your particular need.


Is this dynamic data stored in db?


You could expose your data using the built in REST solution. Once you have your data exposed. You could just use jQuery REST api's to retrive your data. 

Hope this helps.