Read-only arrays (usually) do not define Set methods. Thus, using one in an Invoke argument that does output will result in compile errors. To help avoid that, modify the type checks to differentiate input and output arrays.