Added a function that can perform a deep or shallow copy of an existing list into a new list.