Function to manipulate a group resolution using keys in an array.
Group passed in array by specified keys