Code reuse is a big plus when you’re developing lots of scripts. The ability to create templates for your code can also save you lots of time – for instance when advanced functions first appeared I create myself a template the included all of the validation checks, the code to switch functionality based on parameter sets and code to handle –whatif and –confirm. Things have moved on since then and there are a number of PowerShell templating systems.
Plaster – https://github.com/PowerShell/Plaster
PSScaffold – https://github.com/RedeployAB/PSScaffold
PowerShell template – https://github.com/kayasax/PowershellTemplate
Check them out – one or more maybe the thing you need or they may inspire you to create something better.