This is similar to $editcontext.editType.
I'm not sure that MapContext is the correct name for this. It could be connectivityContext, or networkContext, but let's go with MapContext for now.
Add $mapcontext.mapState to the Form Calculation and Constraint Arcade Profiles. It would return either "Online" or "Offline". I could write it to an attribute in my schema to store the state or use it to inform other actions.
Generally, I might want to know which map version was used or whether a user collected the data in an online map or offline map.
In the event that we have the ability to make web requests in the future, from within the mobile app or web map viewer, this would serve as an option to help to shut down any attempt to do so if we were offline.
EDIT:
This might just be a property of the existing $editcontext. Perhaps $editcontext.editState (returns Online or Offline).