fix(client): Ensure empty array argument is not turned into object (#19414)
* fix(client): Ensure empty array argument is not turned into object
Most of this PR deals with ensuring that validation error for array item
is rendered correctly when using GraphQL protocol. For JSON protocol, it
also adds a fix to a crash during nested array error rendering.
Fix #18846
* Add some comments