Switch repeating logic to iterables.

Improve config parsing of iterable values.