Do you familiar with array and bitarray ?
Let's check in my head about it :p
it's Available in 3ds Max 2008 and higher. Previously available in the free [AVG] Avguard Extensions.
if you are using 3ds Max 9 and Lower without installing [AVG] Avguard Extensions,
you can create a similar function , such as:
fn makeuniquearrayX arr =((arr as bitarray) as array)
explain: the array will convert to bitarray then convert to array again
example to using it: