To generate random numbers in a variable you can use the Set Variable command and instead of putting a number in use the code "Random(START,END)".
So presuming you want random numbers between 0 and 5, you would use
However, this will generate any random float between 0 and 5, so it allows for things like 0.1, 1.5, 2.3, etc.
to combat this you can add an additional parameter in.
this will round the float up to a whole number.
0.4 becomes 1.
1.5 becomes 2.
2.3 becomes 3.
If you want to round the number down you can use:
This will floor the number.
0.4 becomes 0.
1.5 becomes 1.
2.3 becomes 2.
In order to check if there is any repeats, you could store the generated number in a separate variable and then run a check after each number generation to see if it exists, if it does, then re-run the generation code.
As an example, this is how you would set a text box to a random array value.
Hope that helps.