I'm not 100% sure that I follow here, but I think your main question is that you want to get the value by ID. I found it in the reference documentation linked from the tcMenu project main page.
https://www.thecoderscorner.com/ref-docs/tcmenu/html/_menu_iterator_8h.html
MenuItem * getMenuItemById (int id)
You'd then need to cast the menu item to the right type, see the guide on menu types for help with each possibility: https://www.thecoderscorner.com/products/arduino-libraries/tc-menu/menu-item-types/
Quick question, would you like the ability to override the variable name used for the menu? I've had one request for that before, and I'm beginning to think it could be very useful in larger projects.
Sorry for the rant. I'm sure the documentation is instantly understandable by people that use Class and Object and other C++ / OOPS constructs every day.
But I don't even though I have used plain C and a dozens of other languages for 50 years.
tcMenu can't solve everyone's problems, and we don't pretend that it does. Using the library assumes a full understanding of OO, we cannot provide that here.
As per the last message, the return value will be a pointer to a type extending from MenuItem. In the menu types documentation (linked in the last reply) each type is documented fully, theres is also full reference documentation linked from the tcMenu project page, this shows the hierarchy of menu items.
As an example, if you wanted to deal with an AnalogMenuItem you would do:
AnalogMenuItem* analogItem = reinterpret_cast<AnalogMenuItem*>(getMenuItemById(myId));
For text menu item, that would be TextMenuItem instead of AnalogMenuitem.
MenuItem types:
https://www.thecoderscorner.com/ref-docs/tcmenu/html/class_menu_item.html
https://www.thecoderscorner.com/products/arduino-libraries/tc-menu/menu-item-types/editabletext-menu-item/
https://www.thecoderscorner.com/products/arduino-libraries/tc-menu/menu-item-types/
Making the IDs changeable after initialization will not be possible as they are treated as immutable data by the API, rendering classes and also remote interfaces. However, you can add extra items at runtime yourself. Many examples add an extra item to an existing menu.