Refactoring array type