Hash and equal algorithms for struct and array types

Also ban a few more types from comparisons.