mapping objects to lucene documents should mark arrays (including empty) with _IsArray field and conversion from lucene documents to RavenJObject in ScriptedIndexResults should take that into account