Fix array types (items, additionalItems), and tuple typing. Add unit tests.