Yes, you can use any variable to get data into (and out of) a Mathcad program function. The only downside is that Mathcad doesn't like mixed units in an array or matrix.
All variables outside the "program" are available inside the protgram; but variables inside the program are local to the...