Custom formatters multiple input fields

When creating the custom module, I need something like the screenshot. Can you share an example for this?

so I need to be able to send more than one variable.

Did you take a look at this: Add grid display type for modules and formatters
There is a “gird” option, but not documented, George says.