Immutable, optimized and optionally typed path-based object property / array accessors with structural sharing