I want to draw a hash table like in the picture with tikz. Note that the numbering on the right is important. The symbol "/" means that there is no key number on this position.

Thanks!
UPDATE:
This answer https://tex.stackexchange.com/a/484083/260640 is almost what I want but it has no numbering on the right and the number of positions is fixed. I want to make hash tables with different number of positions.

