Update grammar to cover optional commas in arrays
Add tests cases for invalid arrays