Array Randomization with non duplicated val ar killing me! Any help is appreciated

Does anyone have a good way to input randomized numbers into an array without the numbers repeating?

for instance a = [1,2,3,3,3,4,5,5] should be a = [1.2.3.4.5]

I’ve tried using dual for loops and a while loop with a for loop… but I cant seem to get it to work correctly. I get them to randomize but they still duplicate!

help please?