Libraries and functions must reside in the database that uses them. Domino does support multiple template inheritance however, so you can inherit different design elements (forms, script libraries, etc) from different source templates. It’s a fairly common practice to have a standard function library in each database inherit from a central repositorydb such as yours.
Another (much more involved) option would be to code your central repository functions as web services and call the function service as necessary.