You simply do it!
Unless I am completely misunderstanding the question you pass an array by simply using the name of the array as the parm.
D Test s 10a Dim(20)
C Call 'XYZ'
C Parm Test
It works the same way for a CallP i.e.
D XYZ pr ExtPgm('XYZ')
D Array 10a Dim(20)
C CallP XYZ( Test )
// or in /Free form
XYZ( Test );
What aspect are you having trouble with?
Depends on the size of the array.
There are number of techniques from passing the array as a data structure to storing the array in a user space, to not using the indicator LR in the called module which will allow access to the array.
You can also try Google for snippets of code.
From the IBM Manuals
In an OPM or ILE call, a parameter is an expression that represents a value that the calling application passes to the API specified in the call. HLL languages use the following methods for passing parameters:
By value, directly
The value of the data object is placed directly into the parameter list.
By value, indirectly
The value of the data object is copied to a temporary location. The address of the copy (a pointer) is placed into the parameter list. By value, indirectly is not done explicitly by the application programmer. It is done by the operating system at run time.
A pointer to the data object is placed into the parameter list. Changes made by the called API to the parameter are reflected in the calling application.
When you call an API, the protocol for passing parameters is to typically pass a space pointer that points to the information being passed. (This is also referred to as pass-by-reference.) This is the convention used by the control language (CL), RPG, and COBOL compilers. Care must be used in those languages that support pass-by-value (such as ILE C) to ensure that these conventions are followed. Refer to the appropriate language documentation for instructions. The parameter passing convention of pass-by-reference can be used in all programming languages. Some of the UNIX(R)-type APIs require pass-by-value parameter passing. VisualAge(R) C++ for OS/400(R) also supports pass-by-value parameter passing.
HLL semantics usually determine when data is passed by value and when it is passed by reference. For example, ILE C passes and accepts parameters by value, directly, while for OPM and ILE COBOL and OPM and ILE RPG parameters are usually passed by reference. You must ensure that the calling program or procedure passes parameters in the manner expected by the called API. The OPM or ILE HLL programmer’s guides contain more information on passing parameters to different languages.
The ILE languages support the following parameter-passing styles:
ILE C passes and accepts parameters by value (directly and indirectly) and by reference.
ILE COBOL supports the passing of parameters by value (indirectly) and by reference.
ILE RPG supports the passing of parameters by value (directly and indirectly) and by reference.
ILE CL supports the passing of parameters by reference.