Looking for a way to toggle whether certain elements from a list are chooseable

You could start with an empty array and as you determine that tiles are potentially okay for your spot, append them to the array. Then choose a random item out of the array. Then clear the array and start with it empty as you check the next spot.