How to implement an assosiative array functionality using dynamic array

In reply to Mark Curry:

Why can’t you just use the SystemVerilog Associative array type?

Most likely because it’s a homework/interview question.