Move logic for computing the need for copying into Type

This is where this logic belongs.
Call |deep_copy| when assigning or returning variables as needed