Properly recursively handle array definitions