Moved array helper functions to utility class
Fixed unresolved namespace
Fixed undefined method error
Changed static reference to self
Use new util class