scala implementations of array and multidimensional array hash tables