I normally write a small program in the processing language that prints the data into format I want for a specific application.
For example converting a list of numbers from a sound sample file into a C program memory deceleration. Or changing a small image to put into a display.
Then I simple copy from the output and paste into the Arduino .h file.
You can’t have a universal code to do this as you can’t anticipate what sort of output you will need, unless a simply copy and paste from a text editor will do.
I did as you suggested for my audio effects on github, and wrote it on CodePen... a little HTML/JavaScript thing.
I know other languages make this kind of thing easier - but I like making JS/HTML do things people wouldn't imagine it being the first choice for. =) I've linked to it on the thread elsewhere.