What should I do so I end up with an array of random numbers like
[2, 6, 4, 9, 0, 3, 7, 8, 1, 5]
[3, 5, 8, 1, 9, 0, 6, 7, 2, 4]
I’m thinking like starting with an ordered array
[0, 1, 2, 3, 4, 5, 6, 7, 8, 9]
randomly pick one by one out
[0, 1, 2, 3, 4, 5, 6, 8, 9] -> [7]
[0, 1, 3, 4, 5, 6, 8, 9] -> [7, 2]
[0, 1, 3, 4, 5, 6, 8] -> [7, 2, 9]
[0, 1, 3, 5, 6, 8] -> [7, 2, 9, 4]
Until I end up with something randomly sequenced.
How can that be done? Or is there a better way?