Array helpers trait

I’ve collected a number of utility functions for working with arrays over the years, mixed in with collections of ‘helper’ functions used in various projects and added to various classes.

They include testing for multi-dimensional arrays, obtaining a hash of an array and flattening arrays so they only contain values.

The way they were getting repeated in classes made me think they should be a trait: