I’m not sure what you’re doing, but it’s fairly clear what you want. For each image, do something like this:
$image_data[] = array( 'h2'=> 'Main Title',
'h3'=>'Sub Title',
'url'=>'http://sample.com/slide.jpg',
'thumb'=>'http://sample.com/thumbs/slide.jpg');
$image_data will eventually have all the data for the whole slideshow. If you need to add data to information already stored in a table, you should retrieve the existing data before adding to it. Then everything can overwrite the old data.