Function cloneFromFields

Create a new object from input, based on cloning fields rather than a destructured copy. This is useful for event args.