Make better use of php's abundant selection of array functions