Sure, you can use this with IDs of array text inputs as selectors.
To use an example similar to your other post about time inputs, this code will insert the dropdowns in the first column of the array:
<script type="text/javascript" charset="utf-8">
$(document).ready(function() {
// Text inputs to be replaced by dropdowns
var dropdownAnswers = $('#answer97841X5X16SQ001_SQ001, #answer97841X5X16SQ002_SQ001, #answer97841X5X16SQ003_SQ001');
// Define the select element (dropdown)
var select1 = '<select class="select1 insertedSelect"> \
<option value="">-- Please Choose --</option> \
<option value="Apples">Apples</option> \
<option value="Oranges">Oranges</option> \
<option value="Pears">Pears</option> \
<option value="Bananas">Bananas</option> \
</select>';
// Hide the text inputs
$(dropdownAnswers).hide();
// Insert the select elements
$(dropdownAnswers).parents('td').append(select1);
// Initially select an option if the question has already been answered
$('.insertedSelect').each(function(i) {
if($(this).parent().find('input[type="text"]').val()) {
$(this).val($(this).parent().find('input[type="text"]').val())
}
});
// Listener on the dropdowns - insert selected values into hidden text inputs
$('.insertedSelect').change(function() {
$(this).parent().find('input[type="text"]').val($(this).val());
});
});
</script>