Add array comparision tests and create indexes for documents