If this is actually in the context of a conversation system, it might be worthwhile looking at some of the conversation extensions in the I7 GitHub. In particular, have a look at the extensions by Chris Conley and Eric Eve. They handle this sort of thing for you, among other features.
In general, though, the concept of what objects can be referred to at any given moment is called the “scope”. You can read more about this in 12.16 and especially 18.29.
A maybe useful tip: if you want to do specific things like the ones mentionned, you can check the recipe book (the “second” manual included with Inform), which shows how to implement specific features instead of describing the whole language step by step.
For example, for “how to make a routine so that after say 5 moves it performs an action”, you can look in the “Time and Plot” chapter, especially the “Event Scheduling” section.
Or for “having an object that isn’t in any particular room but can be referenced by the parser” (for topics that can be discussed), you can look in the “Other Characters” chapter. Since it’s a more complicated topic, it’s more difficult to find the relevant section; “Saying Simple Things” seems to contain what you need.
The examples will often require some knowledge of Inform, but usually they are easy to understand (and you can jump to the corresponding section of the main manual if needed).
The examples are cross-indexed both ways, too, so if you can more easily locate a particular example in the Recipe Book based on theme, you can then click through to the Writing with Inform page that talks about its key feature for more information, and vice versa.