fixes #5354 Delete archives by batch of 1000 using array_chunk