Copy an object based on a mask of allowed or denied properties