HashMap using arrays