You can write data to different parts of a matrix by using usedstdim 1. I suppose it would be easiest to set the usedstdim to 1, the dstdimstart to "1 0" and the dstdimend to "width+1 height". Then when you’re inputting the matrix into it it will write to the correct location without you having to copy the matrix.
Reading parts from a matrix can be done by outputting it and using [jit.submatrix] to reference to an area. Takes a little bit of getting used to, but very handy.