runtime: implement struct and list deep copies