Videos
There is a way to create and access custom objects in Shopify Liquid. This is as followed:
{%- liquid
assign obj = null | default: key: 'value'
# obj.key -> outputs value
# obj | json -> also works
-%}
Please keep in mind that this is an undocumented 'feature' within Shopify Liquid. Use with care. Support could be either announced in the future of removed without any notice.
You're in luck. Here is the pattern for you. Shopify has built in Liquid objects it knows all about. You want to enhance those with data not in Shopify, but still present the merchant with Liquid they can edit and style? OK. So those are templates. Knowing that, you can install an App in the merchant store, and code up a Proxy. You can use that and embed a callback to the Proxy anywhere in the merchant theme where you want to render your custom Liquid. The Proxy can return Liquid! So you can accept a callback, work on a template in your App, fill in the custom data, and return that template to Shopify with any Liquid Shopify would have data for. Now Shopify accepts the Liquid from you, partially filled out by you (your custom data), and it will fill in the rest of the Liquid that it is responsible for.
Boom. Merchant gets Liquid sandwich all rendered nice. It is a neat pattern.