What if I told you that you can use the heightmap to find the highest block more quickly?

Also if you always cut the arrays on a full XZ plane boundary, you won't need to do any searching other than the maximum height in the heightmap.