Improve parsing of arrays