Improved the generics implementation of the Hash, but still can't get it to work with an array and without any unchecked casting.