<input type="text" name="contact[]">
. Тогда в PHP придёт массив значений $_POST['contact'][].<input type="file" name="f[]">
. В обоих случаях обработка стандартная, через массив $_FILES var books = [];
var book1 = {};
book1.title = "My Book";
book1.pubYear = 1986;
book1.price = "50 UAH"
var book2 = {};
book2.title = "My Book 2";
book2.pubYear = 2012;
book2.price = "170 UAH"
books.push(book1);
books.push(book2);
//или for или books.forEach
for(var i=0; i<books.length; i++) {
var y = books[i];
console.log(y.title);
}