serialization function for built-in octave data types