Creates a copy of a subentity.
If successful, returns a pointer to the resulting copy. Otherwise returns NULL.