matutils: add method for creating aligned arrays