Include files in config.php

I have a large config.php file due to many routes, and I wanted to know if I can include external files to organize it better. I want to include route action functions specifically.

Yes, see and the included file:

The second link’s implementation is close to what I need. Instead of going to a page, where can I specify a function to use in config?

For example:

'action' => myCustomFunction($argFromPattern)

I used a simple plugin and it works:

'action' => function($argFromPattern) {
  return myCustomFunction($argFromPattern);