Highlight individual characters in match

Hello everyone.

I am trying to highlight individual characters within a match. As an example: for every instance of the word animal in my document, I want to highlight the characters a, n and l within it. Ideally this highlighting is also easily toggle-able.
Anyone got an idea how this could be implemented easily and efficiently? I already found the functions addmatch and addmatchpos, but these allow me only to highlight the entire word (as far as I can see).

Some background: inspired by chording keyboards, I want to write a small plugin that allows to write entire words by simultaneously pressing a certain combination of keys (zb. pressing A, N and L in insert mode writes ‘animal’), using the arpeggio-package. Under the hood there is a dictionary that maps these shortcuts to their expanded words. I already got that working.
Now I want the thing itself to teach me all the possible chords by highlighting the chording letters in a word that can be chorded, so that when I type a word, I can see how it could have been chorded.

Any help is welcome.

Would something like this work

vim.cmd('highlight GROUP_NAME guibg=blue')
vim.cmd('syntax clear GROUP_NAME')
local dict={animal={1,2,6}} --Value: position_of_letters
for word,v in pairs(dict) do
  for _,position_of_letter in ipairs(v) do
    vim.cmd('syntax match GROUP_NAME "'..word..'"lc='..(position_of_letter-1)..',me=s+'..position_of_letter)

Works like a charm. not quite sure what all this does, but I guess I can read about it in the syntax highlighting Docs. Thanks a lot!