This method has a lot of overlap with `set`. Can that be reduced (perhaps by making `set` just call into `set_many`, or the like?