Creating a shop with random character on purchase(Croassy Road Style)

I’m trying to create a shop which generates random character upon purchase.

I have set up the scene but getting trouble with the scripts.
Here’s the set up:
*A scene with character selection screen.
In this scene, I have several characters placed. Each character has a boolean “purchased” to check if the character has already been purchased (unlocked) or not.
Also I added a new empty gameobject to contain the list of characters object. Let’s say this is “characterList”

*A shop scene
In this scene there’s only a button “buy”, which if clicked then it will randomly pick a character. The character will be retrieved from the “characterList” list. If the picked character is already purchased, the buy process will automatically re-roll.

Any idea on how to create this?
thank you

I copy-pasted the title of your post into google… looks like a lot of source material…

7523294--928292--Screen Shot 2021-09-25 at 8.20.45 PM.jpg