I think this might be what you are looking for:
var get_images = ["show_1.jpg", "show_2.jpg", "show_3.jpg", "show_4.jpg"];
var original = $('#container ul').html();
$.each(get_images, function (i, img) {
$('#container ul').append('<li><a href="#" class="thumbnail"><img src="' + img + '"/></a></li>');
});
$("#revert").click( function() {
$('#container ul').html(original);
});
The revert button is for demonstration purposes. The idea is basically that you save your original content so that you can revert back to it later if needed.