matrix to array jitter mxj

I’m working on a mxj patch that takes a float32 matrix with only one plane, but X and Y. I want to check each element in the matrix and perform calculations on the data. I was using getCell2d(), however that was very computationally strong. I then tried to copy this matrix to an array and work on the array instead. I would then go through this succesively with a for loop for X and Y. The code compiled, but when I run the code I get an arrayOutOfBounds exception error. The documentation does not explain how the matrix is changed into an array, so am I trying to access the array in the wrong fashion? I presumed it would be transfered into an array like array[640][480], but that does not seem to be the case. I’d really appriciate any help with this as it is driving me slowly towards insanity.

Here is the code I made.. In this case I am trying to keep track of the data in the array and output the lowest value.