array.h refactoring