Arrays are arrays. With an array (It’s easier with a generic List) of FileInfo, you have two options for avoiding selecting duplicates. You can remove them from the collection, or you can add them to a second collection that you use as an exclude list. On selecting a random FileInfo, you can check it doesn’t exist in your exclude list, if not use it and add it to the exclude list, else pick another random FileInfo and try again...