Help with a roguelike menu creation

You make 1 widget. You show 3 instances of that widget, each with different data.

How do I choose 3 random from the 20 total?

  • keep abilities in an array
  • shuffle, grab the first three
  • make widgets, show the abilities
  • remove the chosen one from the pool once it has been selected

Pseudoscript:


Games that implement this: vampire survivors, rogue tower, brotato.

Disclaimer: going by the description, no clue how those games work, only heard about the 1st one. Brotato sounds catchy, though!