Distributing a deck of cards to a grid via one button

I’m needing to “seed” a 12x8 grid (of squares) on the main map board with 96 “cards” from a deck of square tiles at the start of a game. I’d like one of the players to click a “Set Up” button, and have this happen automatically.

Alternatively, a user could click on the deck, select multiple cards (96 in this case), then drag the pile of 96 into the upper left grid space in the map window and have the pile simply distribute themselves across the 12x8 grid, filling up one space each.

What do I need to do this? Obviously, the grid will need to be numbered, but what am I looking at needing to do to create this action? Thanks.

Figured it all out.

I hope you share your solution, could come in handy one day!