If the islands are instances with a sprite, then you can just add them in with mp_grid_add_instances. If you were using something like tiles, i.e not a "physical" graphical property within the world (at least as far as an mp grid recognizes), then you can use mp_grid_add_cell.
Basically you have a couple of different ways you can manually or automatically set cells, and which of those you use will depend on how your game is set up. Without knowing how you are making your game I can only point you in the direction of those options. As an example: if you were just drawing the islands as tiles - you could loop through the tiles, find their x / y position and convert that into a grid coordinate. Then you would manually add that into the grid using mp_grid_add_cell.
In my experience mp_grid_add_rectangle is better than mp_grid_add_instances for performance. The latter is simplest to do with it being automatically handled by GMS, whereas the former requires a small amount of your involvement - such as using the bounding box dimensions, or sprite_get_width / sprite_get_xoffset etc, to get where the rectangle begins and ends.
EDIT:
How they work:
mp_grid_add_instances: all processes are handled automatically, does not require defining a cell coordinate
mp_grid_add_rectangle: does not require defining a cell coordinate
mp_grid_add_cell: requires defining an actual cell coordinate, such as mp_grid_add_cell(grid, x div 32, y div 32) would take the x / y positions and return what they are divided by 32 (if 32 was the width / height of the grid cells)