lua.wetgenes.deepcopy
deepcopy(tab)
Create and return a new table containing the same data as the input. If any of the table values (not keys) are tables then these are also duplicated, recursively.
If this is called with a value that is not a table then that value is just returned so it's safe to call on values without checking them.