Updating 2D arrays or passing 2D arrays to blocks


I am working on am imaging application where I get 3 inputs. A
raw_signal which I need to image, an X signal and a Y signal. The X
and Y signals tell me where I need to plot the signal that I receive.
They correspond to voltages of a raster scanning system. The
raw_signal goes into my block and become “processed_signal”, along
with “m” and “n” values such that “processed_signal” needs to be
written to position (m,n) in a 2D array/image

(raw_sig, X,Y) —> (block) —> (processed_sig,m,n)

Is there a way from python that I can create a 2D array and then
“watch” the outputs’ sample by sample and do this ? Alternatively a
faster way is to can I create a 2D array in python and pass it by
reference to my block, so that the job of updating the 2D array is
left to my block.