The question you're asking seems interesting, but I don't understand J code so I don't know what you're talking about. Expanding the explanation would be helpful!
The 1 cell of a matrix are the rows, etc.
We had a weird multiplication last year and the solution in python was to use @guvectorize https://numba.pydata.org/numba-doc/dev/user/vectorize.html and broadcasting. I don't know if that's possible with your problem.