Let $A$ be an array of values. I want to transform it into a new array $B$ by the rule $$B_{m,n} = A_{m-1, n-1} + mA_{m, n-1} + nA_{m, n}.$$
If $A$ had been a vector, I would represent this by a matrix $T$ and write $B = TA$, but how do I do this for an array?
I tried to represent the transformation in matrix form but the first term is giving me trouble, since it's on a different row and column. Matrix multiplication from the left allows me to combine column elements and from the right row elements, but I can't seem to get anything else to interact.