The simplest way would be to write that data onto a file written on an SD card on the V5 Brain.
You may find these helpful:
https://api.vexcode.cloud/v5/html/classvex_1_1brain_1_1sdcard.html
Edit:
You can also use the standard C++ std::ofstream to write to a file onto the V5 SD Card, Which is probably an easier method in my honest opinion.
https://www.learncpp.com/cpp-tutorial/basic-file-io/
https://www.cplusplus.com/reference/fstream/ofstream/