Change the select to support multiple

Modifications to allow the select template to works with select with multiple attribute.

- Added "[]" to the name of the field in order for the mapping to works afterwards.
- Use a Set to handle already selected values.