You could use jquery's for each function to traverse each input field and do what you like with them. You can use jquery selectors to get the inner html, or value, or whatever you like, and store it in an array. For example:
jquery
function formHandler(){
$('input').each(function() {
//do stuff here for each input, increment an array, store data at that index, etc...
var innerHTML = $(this).html(),
value = $(this).val();
}
}//end formHandler funciton
Then simply call that function when needed, or run it when the page loads...