Moved schema types into separate modules

Allow users to create types with custom logic. Created types for some common use cases.

Also added support for arrays.