I think I know what you mean and I did something like this the other day with 2 for loops to have one give numbers and the other check the numbers for repeats.
Personally I'd like to see a function that could assign numbers to arrays for a random number set. I.e if you have an array[10] those array[0] through array[9] would each be given randomly one of the numbers between 1-10 so that none of the arrays have the same number like:
new array[6]
command(array)
then with a get_command(array) you would know that:
array[0] = 3
array[1] = 5
array[2] = 6
array[3] = 2
array[4] = 4
array[5] = 1
etc. etc.
You could use this to easily shufle players to different groups or give each player unique things like every player has one random individual weapon or characteristic without having to check if a number has already been used.