Access template custom list by index

Hi, I’m looking to use a (key, value) pair in custom template variables. As I understand it, it’s not an option right now. As an alternate solution, I’m trying to understand if there’s a way to access the list of comma-separated values in a custom template variable by index instead? This would work as a good workaround for my use case.