I am trying to create a shuffle play feature for a music streaming app and I'm trying to figure out the best way to create this. I want to be able to shuffle through an array by selecting a random index but not selecting one that has already been selected. I can think of a few ways to do this but none seem very elegant. Has this problem been solved before? Is there a simple solution to this?
Thanks