Clone a deck and send to another map

I am creating a module where a number of action decks are in a map used as repository, and where as initial stack a player will select the deck and have it cloned and available for the game in his private map.
I am very new in the programming and looking for instruction, example or syntax.