Generic chunked iterator