add hash_by_length method in Array class