On the Delphi side you write it like this:
function GetArrayData(arr: PInteger; len: Integer): LongBool; stdcall;
var
i: Integer;
P: PInteger;
begin
P := arr;
for i := 0 to len-1 do
begin
P^ := i;
inc(P);
end;
Result := True;
end;
Here we receive a pointer to the first element, and the length of the array.
And on the C# side you would write:
[DllImport("some.dll")]
static extern bool GetArrayData(int[] arr, int len);
....
int[] arr = new int[42];
if (GetArrayData(arr, arr.Length))
....
The calling C# code allocates the array and passes a pointer to the first element to the Delphi code.