Array: spawn an item, delete the item spawned and if no items left, re-enable the array?

Hey, folks! I have a very specific idea regarding the level streaming in my project. I want to have the following function:

an array of levels that I want to make visible at random, and I do not want them to reappear until the one cycle of the array making my levels visible ended. I know that I can delete my indices after each loop, but is there a way to reset the array to its initial state?

Thank you in advance.

Have two arrays. One holds the levels, the other is a copy which you shuffle and use. When you’re done, just copy the original across again.

BTW: Only ever remove the last index, otherwise looping will not work…

Thank you so much, sir! You’ve helped me immensely! Didn’t expect anyone to help me with this particular question. Now I have a small related question - is there a way to easily copy all items of one array to another? I’ve been searching for an easy solution, but haven’t found one.