dunno about classes, i think that [man]serialize[/man] might work for them.
as for array's it's not hard. just do something like:
mysql_query("INSERT INTO table SET array=".implode("|",$inarray);
of course this wont work for multi dimensional arrays, but i could write a function for it....