Any of the existing plugins in CPAN are already available for your consideration as a starting point. When I searched for template plugin, I got about 1,200 hits today.
Yes, judicious use of custom plugins is a very beneficial part of Template-based application design. Many app designs turn out to have reusable, app-specific presentation components that appear in many places. These are excellent candidates to become plugins. What might otherwise be complexity (and duplication) across many templates, instead becomes a shared reference to common code ... the custom, your-app-specific, plugin.