matrix: implement row major access
tests/matrix: add access test