traverse the full array by a hash function.