Read this thread
https://smilebasicsource.com/forum?ftid=192
The Fisher-Yates algorithm is the best:
FOR I=LEN(ARRAY)-1 TO 1 STEP -1 SWAP ARRAY[I],ARRAY[RND(I+1)] NEXT
Root / Programming Questions / [.]
FOR I=LEN(ARRAY)-1 TO 1 STEP -1 SWAP ARRAY[I],ARRAY[RND(I+1)] NEXT