Make types cloneable with refcounts behind the scenes