do not pickle cached hash of arrays (#563)
* do not pickle cached hash of arrays * no clue why this works * remove unneeded changes * add an explanation * add simple test * add another test * copy getstate/setstate implementation from dataclasses * typo?