The way I would do it (but I'm not sure of the coding or whether it's most proficient) would be:
1/. Create an array
2/. Create a duplicate array
3/. Shuffle from the first array and put in second
4/. Pick a random array field from second
5/. Check whether that field holds a number that's not being used (say 999)
6/. If it doesn't, do whatever you going to do with it then put 999 in it.
7/. Goto 4 unless it contains 999
8/. If that particular field that was randomly chosen contains 999, choose another (goto 4).
Does that make sense?

I reject your reality and substitute my own...