HTL is strictly presentation layer. There is no way to create objects or write any logic in HTL. You need a support class(Sling Model or Use class) to return ValueMapResource object. The returned object can be included in HTL.
You can simply create a node in crx/de of required resource type (here : "granite/ui/components/coral/foundation/form/checkbox") . You can add the properties to node, like here you're putting it in ValueMap and you can include that resource using data-sly-resource HTL syntax like below :