Abstracting data array manipulation