How can I make my sidescroller pick random stages?

I have a ton of random stages, and I don’t know how to compile them so that they go one after the other.

I would maybe use a module script that loops through using a for loop. Are you looking for the stages to randomly be selected and then not get selected again in the same round? Because if so, I would definitely compile all of the stages into a table and remove each stage from the table after it has been used.