You can create a library of functions (with ".pragma library") and then import the script file whenever you want and simply call those functions from whereever you need. Regarding the list model, I have no idea how you would want to use LocalStorage there. ListModel is a crude container for simple item data, if you really have to, you can of course insert data to the model when you need it but that is it. It is much better to implement your model in C++ (e.g. using QtSql module) and then export the objects you need (the model itself and maybe a filter proxy model) to QML.
Bookmarks