Allow collection encoders to encode iterables as well