My proposed solution involves creating a new, empty array in which you want to save the mixed values. Then randomize a number that is between 0 and the size of the array to be mixed. The element on the randomized position is added to of end of the new array. After that, the element is removed from the original array so it don’t need to be processed further. Now the process is repeated and you select a new, randomly selected element from the remaining elements of the original array. When the original array is empty, then all elements is stored in the new array in a scrambled order.
I have also seen another method for randomizing arrays that was written in Perl, where you instead chose a random position in the new array, seeing if it was empty, and moved the first element from the original array to the position in the new. It also worked fine when I tested it but it seems ineffective on a larger amount of elements where much of the time could be spent on randomizing positions that are already occupied.