general refactoring, new class ArrayUtils