There is no standard way of doing this, but of course it's a good thing (for maintenance, ... ) to code functionality in one place and to split your business logic.
Writing a package is not the answer to your question, the use of a package is to re-use code between projects.
So YES you should write (a) common class(es) and use them where you need. To use them you can call it where you want or write it as a service to make it available as other services.