Export grid?

I need a robot to search every grid point in the Occupancy Grid Map layer, how do i export the grid in order to make each gridpoint a waypoint? Is there a better way? Is there a built-in function I have yet to find? ;)