If you want to use an arrayfields value as attribute for a function, you can't use:

1
{func var="test $foo[bar] test"} <-- sees $foo[bar]

like described in the manual.
You have to use this instead:

1
{func var="test `$foo.bar` test"} <-- sees $foo[bar]