I havn't tested this for I don't have 500 names to play with
I take it that name$() is a fixed list of names copied into planet$() in a random way, so why not shuffle them:
` set planet names...
for i = 1 to 500
planet$(i) = name$(i)
next i
` ...and then shuffle them
for i = 1 to 1000
` select two random planets
repeat
p1 = rnd(499)+1
p2 = rnd(499)+1
until p1 <> p2
` then swap them over
temp$ = planet$(p1)
planet$(p1) = planet$(p2)
planet$(p2) = temp$
next i
...adjust the value of the for loop if you need it more or less shuffled.
Programming anything is an art, and you can't rush art.
Unless your name is Bob Ross, then you can do it in thirty minutes.