Finding the highest point of a terrain relative to camera direction

Basically my need is to know the highest terrain Y relative to the direction im facing (middle of screen) where the terrain meets the skybox.
Is it possible to raycast from the top of the screen downwards to hit the highest point of the visible terrain relative to the camera? (think of any given frame as a 2D picture with 1 layer where the skybox has alpha set to 0, my objective would be to raycast from top of the frame down to the first contact with the terrain)

Use a Plane, Move it downward till it hits with the terrain, adjust the colliders and the hit info to get only confirmation when the hit is with the terrain. You might wanna do this before starting the game. When a collision occurs just save the x,y and z data.