Created a factory to hold the array operations