Add a function that copies selected values to groups of values in the result array. Add a runtime-typed version and a version for affecting all attributes. Also make the "gather_group_to_group" follow the same pattern.