It's probably easiest to use a decomp for it, if you're familiar with ASM and hooking.
It wasn't any new menu option, I just offered it via a script when the game started.
As for the HM system, I made it part of the CFRU! It just checks if you have a Pokemon on your team that can learn the move to determine if you can use the HM.
https://www.pokecommunity.com/showthread.php?t=425447