shellcheck-2
Shellcheck warned for elements within a range ([]) to be repetitive, but that also warned for wishfully repeated element such as variables. The fix is to account for dereferenced elements, such as variables, and not warn in those.
[value-checks]
[missing-case]