Better support for arrays in queries and returning arrays in json.