EntityInQueryIndex?

in EntityCommandBuffer.Concurrent, does the entity in query have to be the same as the one that the ecb is acting on?

so can you do something like this, even though its not the entity in the job?

Entities.ForEach((int entityInQueryIndex, EntityContainer entityContainer) => {
    ecb.DestroyEntity(entityInQueryIndex, entityContainer.Value);
}).ScheduleParallel();

Yes. The index being passed into the ECB is just to ensure thread safety.
If you were using IJobChunk you could use chunk index instead for example.