For Arrays i have added predicates for converting Prolog lists [] to the needed float_array type and when receiving an array also Predicates for converting it to a normal list.
A Matrix is just a long list with the added information how many row it has.
In both cases when using the array in a function the size must also be send, since after sending or receiving it you cant get the length of the array from itself.