Assuming you have an array $locations
available, you can use this code to generate a dropdown in the customizer. It’s not that different from a single value.
$section_name="wpse213980_section_name"; // adapt to your naming system
$section_title="wpse213980_section_title"; // adapt to your naming system
$setting_name="wpse213980_setting_name"; // adapt to your naming system
$setting_field_type="select";
$setting_field_options = $locations;
$sanitize_callback = 'sanitize_text_field';
$wp_customize->add_setting($setting_name, array(
'default' => '',
'type' => 'theme_mod',
'capability' => 'edit_theme_options',
'theme_supports' => '',
'transport' => 'refresh',
'sanitize_callback' => $sanitize_callback
));
$control_args = array(
'section' => $section_name,
'label' => $setting_title,
'settings' => $setting_name,
'priority' => 10,
'type' => $setting_field_type,
'choices' => $setting_field_options,
);
$wp_customize->add_control( new WP_Customize_Control ($wp_customize, $setting_name, $control_args));
Props Otto.