Adding a utility library is a great and convenient way to provide convenince functions for use at a global or near-global level.
Hooking a utility SSJS library works about the same as any Code > Script Library asset in XPages. You can add it via a Theme, my personal recommendation as it makes keeping things tidy quite easy, or by adding it as an xp:resource (resources at the root XPage or Custom Control via the pretty pane). The down side of relying on adding it to a Custom Control is that it will only be available in an SSJS code block if the Custom Control in question has been loaded as part of the user's component tree (the built page); this also leads to potential duplication if the developer starts loading it on lots of Custom Controls.
Adding via a theme is easy enough, just edit your existing or create a new one for your app and have it extend the theme you were already using (e.g.- an out of the box one, like OneUIv3, etc.).
<theme extends="...someTheme" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<resources>
<script target="xsp" src="/utility.jss" clientSide="false" type="text/javascript" />
...
</resources>
</theme>
The utility library is now accessible from your SSJS script blocks (#{javascript:return u.asVec(document1.getItemValue("SomeFieldName"));}
).