C++ nor GDK can guess how you want your data to be serialized, so you must handle this yourself. The easiest way to just dump an array into a file would be to first store the amount of bytes you wish to write as an unsigned integer then just copy that amount from your array into the target file. This can be done very easily, assuming you're using fstream, you can just write the size: "myFileStream << sizeof(WhateverType) * indices;" then copy the data in: "myFileStream.write( myArrayPtr, sizeof(WhateverType) * indices )". The inverse is very similar, just get the size via >> then get the data block using this read size via read().
However, this has the same issues as a shallow copy in that if your data stores any pointers or anything that stores pointers internally, such as a std::string, then it won't load correctly if the data it points to changes, which for a load/save system it most certainly will. The better way to handle this is to overload the << operator for ostream for your class you wish to save(if you don't have a class then you're doing it wrong) then manually handle saving of the data, for some classes that may just be the above example, but for others you may want to push strings into the stream so only their contents get written etc. You would also do the same for >> from ostream to handle loading.
A quick Google search finds
THIS.
So in short, there isn't and shouldn't ever be some magical function that just saves any array because more often than not, it will cause problems.