mescc: Refactor array ref.