Update array parsing to be more strict (fixes #5)