Are you talking about partials?
It sounds like you are wanting to create something like shortcodes that you can use inside of templates (layouts, partials, etc.). Those would be partial templates. You can pass multiple parameters to a partial template by using a slice, dict,
.Scratch as the context (the parameter after the partial path), and/or using front matter/site config variables.