convert maps in arrays so elasticsearch doesnt get too many fields