Trying to create card battle system (sort of)

I've had a card plugin for mz for a long time now, but I like the good old vx ace and I'm trying to assemble a card system out of crap and sticks.

The idea is this:
- items act as cards (easy),
- a script is added for independent items (due to which duplicate items will not be grouped in the menu, script exists),
- a script is added "items cost mp" (script exists),
- a script is added "a character can use any number of actions until he performs a certain skill" (there is no such thing, I asked here, but this is a solvable matter, I think?)
- a script is added to change the combat menu to "cards/end of turn", where cards display the item menu, and end of turn is the skill at the end of the turn (such a script exists)

The only question here is how to make it so that from the list of items that we now have cards, not the entire list of cards is displayed to the player, but, for example, random 5 available ones. This is a real question. Any ideas for a solution?
Not specifically what you seek, but there's a actions/items as cards script collection by pencilcase27
I have this collection of the scripts (and i liked them very much) but in this case i try to emilate diferent mechanic.

Original thread: https://forums.rpgmakerweb.com/threads/trying-to-create-card-battle-system-sort-of.176085/