You'll have to keep track of what numbers have been used. One way that I'm sure isn't the best is to populate another array with the range of numbers you want, randomly select an index from there and check it against some value out of the range you want (for example -1 if you only want positive integers), replace the value you took with the "used" one, and then select another random index until you get one that isn't the used value and keep doing that until you filled your array.
DIM A[5] = [-1,-1,-1,-1,-1] DIM NUMS[5] = [0,1,2,3,4] FOR I=0 TO 4 WHILE A[I] == -1 T = RND(5) IF NUMS[T] != -1 A[I] = NUMS[T] NUMS[T] = -1 ENDIF WEND NEXTEDIT: See SquareFingers' post below