optimization: hoist array metadata access out of loops (sometimes)
this helps most matrix inner loop code, the laplace benchmark most of all.