Arrays can be passed, by copy-in/copy-out, if they have elements of any of the "Primitive Types": boolean, char, integer (1, 2, 4, or 8 bytes, signed or unsigned), real number (4 or 8 bytes), or string.
Beware: if you call an unmanaged function, passing a byref array argument, PInvoke copies all its elements to an unmanaged buffer. However, when copied back, PInvoke has no longer knows the size of that unmanaged buffer, so it copies back just 1 element. On return, the array has been resized to 1.