I’d need to see the actual code to get an idea of the level of styling and it’s responsiveness to write something concrete. In general I can say though that when you give the elements any kind of styling, as long as the common factor is a specified class, they could be copied/cloned to the randomised container. Individual styling could be done with identifiers or other shared classes. Just make sure the ‘bare’ content is inside the common class.
There would be two main objects then – one with original layout and another with the clones. The buttons would then show/hide each.