Where do I store custom functions that call custom page template files?

You should place this function into your theme’s functions.php.

Never mess with the core WordPress files (anything in the wp-includes, wp-admin directory). An error can lead to a non functioning site, and the files get updated.

WordPress never updates your custom themes, so this is the way to go.

Of course, if you have a lot of functions, you can create a library directory in your theme and include all the files containing the functions.

You can also create a Plugin for your custom functions – but in your case, as your theme relies on the function, it should be included in the theme.