Here's an example that creates an array with the stack card names as keys. Each array element contains a list of the controls for the card.
on mouseUp
local tCurrentStack, tCards, tCurrentCard, tControlsA
put "MyStack" into tCurrentStack
put the cardNames of stack tCurrentStack into tCards
repeat with tCardIndex = 1 to the number of lines in tCards
put line tCardIndex of tCards into tCurrentCard
repeat with tControlIndex = 1 to the number of controls in card tCurrentCard of stack tCurrentStack
put the name of control tControlIndex of card tCurrentCard of stack tCurrentStack & LF after tControlsA[tCurrentCard]
end repeat
end repeat
end mouseUp
to show the controls from card "MyCard"...
put tControlsA["MyCard"]