In simple words - you need to shuffle values in 1D array?
You can pick a random index from the array, insert it into another array, and remove from the original array. Repeat until the original array is empty.
Another method is to add a second row to the array (set height to 2). Put your numbers into Y=1, and fill elements in Y=0 with random values. Then sort the array.