Sure you can. A lot of the lcd menu options send Gcode to a serial port of the CPU. Same as Pronterface or any other printer host program does.
I'd open Marlin in ArduinoIDE and search for terms like G28, G1 etc... that will lead you to the right subroutines, where you can add/modify code to your hearts content.