Optional/Empty arrays

@TabDigital/api

Add support for allowing optional arrays

If array is not optional, by default should not be empty
You can allow an array to be empty by adding `allowEmpty` flag