core: Array refactor