camera.unproject_position(point) gives you the screen coordinate of a 3D point seen by the camera.
You can easily make an arrow that look at that point when this coordinates are offscreen.
if point.x<0 or point.y<0 or point.x>get_viewport().size.x or point.y>get_viewport().size.y:
now you should define a
positionate_arrow function to place it on the border of the screen, cant think about anything smart right now, but hopefully you got the point.
if placing the arrow on a circle around the center of the screen is enough for you (as it seems is enough for no man sky), you can go with
var circle_radius=min(get_viewport().size.x, get_viewport().size.y)/2