Refactor array & nearray arbitrary