So suppose you have a deck of cards, that might have some number of cards.

First the cards are shuffled, in effect placed in random order.

Then the deck is split, ie. some number of cards are lifted from the top
of the deck and placed under the remaining cards.

How would one implement this? I was thinking of using an array, but how to
shuffle the deck, and how to split the deck?

grrr