Arrays are often overrated.
To pick two non-repeating random values you need the AdvancedRandom plugin:
You can also do this with object instances. Say, if you want to give the player 2 random keys out of 10, you can place all 10 key sprites on the layout (somewhere off-screen). Then on start of the layout pick two random key instances and destroy the remaining ones.