Firstly the following is wrong:
double* arr = new double[sizeof(data)];
This will not get the size of the array passed in to this method, but the size of a pointer. You will need an extra parameter that gives the array size.
Secondly, the following line is wrong:
data[i]->CopyToBuffer(pinned);
because
System::Double
[
^] does not contain a
CopyToBuffer()
method.