GML Programatically Create a List of All Rooms

I'd like to make a list of all game rooms (their numbers and names) that's programmatically created (meaning the list changes when I add/delete/rearrange rooms in the resource tree and then run the game.)

Can I use room_last, and loop through, or do I have to worry about missing room indices, or room_last not being the highest number?
 
Top