I knocked together a quick example. Hopefully the code is understandable, but keep in mind its probably pretty rubbish. The technique works though.
Every 2 seconds I generate a random number, which I take the ceil of to round up. I compare that to the LastPlace variable I made, which starts at 0. When they don't match, I go ahead and print the place to a column on the left, then set the last place to that random number. Then I generate another random number and check if they match. If they do, I generate another random number using the same formula, and print a message in the column on the right to show that its working and when a collision has happened.
I also used a boolean in the sample to show you how to work with it. To check whether its false you have to invert it from the right click menu.
Now you just need to translate the places into destinations.