The array of codes is an array of f_number_unsigned_t and not uint8_t.
I was probably thinking about the array only needs to be of type uint8_t long, which would be represented by the counter.
I probably then accidentally set the value type to be uint8_t to match that.