Multitask?

In order to simulate multitasking you have to use non-blocking code... code that doesn't wait for input but reacts to new input as it is detected. To do that you need some variables to keep track of the current state:

Idle (displaying whatever you want when no specific train is selected)
Train display (displaying the data for a specified train when a letter has been pressed)
Train Address (gathering digits for an address change)
Train Function ID (gathering digits for a function ID)
Train Function Value (function specified, now need parameter for that function)

Within each state there will be other state variables, like the selected Train, the Address entered so-far, etc.

The LCD is updated periodically, say about 10 times per second. Best not to clear the screen and update everything every time since that tends to cause nasty flicker. See if you can clear the screen only on state changes and do the periodic updates only on the active parts of the screen.

At 5 to 10 bits per millisecond I don't expect your DCC messages will take long to send. You may not need to do those "in the background"