Ok, so each card will have a unique type and for each card type there will be some data associated? Will it be data only or Lua code as well? I would probably store the data files as custom resources and load them via sys.load_resource.
Do you have to know and load all files or could you load them one by one when needed, and over time build that local set = {}
in your example? If you organise your files in such a way that the file names can be composed from the card type then this seems like a doable thing (eg “green_coin” would match a file named “/main/data/green_coin” and “red_dragon” would match “/main/data/red_dragon”).
If the files contain only data then consider storing it in JSON format and convert to a Lua table using json.decode. If the data is actual Lua code then load it using loadstring().
The above solution allows for a very dynamic way of dealing with your card data and it would make it easy to patch the game data without having to release a new version of the game. On the other hand does it also make it a bit harder to manage and work with the code and data in your game. If the card types are known I would probably manually build that list of cards in your example and keep the card data in Lua modules that are required at runtime.
PS Using a hash as a table key as in your example will only work in debug builds. Use hash_to_hex() to convert a hash to a string that can be used as a table key.