Converting the_content string to an array?

Filter 'img_caption_shortcode'. You get three arguments: an empty string, the attributes (including the attachment id), and the caption content. If you return anything but an empty string WordPress will print your return value instead of its own code.

See wp-includes/media.php for details.

Another option: hijack the caption handlers and create your own output or change the output WordPress builds before it is sent back to the content.