My proposal is to add functions to Memory and ExternalMemory that allow for iterating through all the available memory pages to get their details such as start address, length and flags.
If I get some free time, I might start working on a PR, but for now I'm creating this issue for discussion.