Allow serializers to take arrays

At the moment serialization only allows individual objects to be serialized.
Arrays of objects need to be `map`'ed in the endpoint.  This commit changes that
so serialize can take one or many objects of a given type and sort it out so the
endpoint doesn't need to.