Implement indexing semantics for StateMonitor

This implements the semantics we agreed on for `StateMonitor`, see #88