The automated feedback system for bash incorrectly says “$/${} is unnecessary on arithmetic variables” when using an associative array in an arithmetic context. In the following example, removing the $ breaks the code:
CHAR_VALUES is used in an arithmetic context so (( ${CHAR_VALUES[$char]} )) can be written (( CHAR_VALUES[$char] )). However, since CHAR_VALUES is an associative array, the [...] isn’t an arithmetic context and $ is needed for $char.