Use shared pointer instead of optional to store rvalues
With optional we implicitly require all finite elements to be copyable. But this requirement is to strict due polymorphic elements. Instead, with shared pointer, we require only rvalues to be movable.