Adding Array::group_by_element script