Well, like noted in several prior posts, there are multiple layers of data that is accesible to/from the vehicle. OBD2 covers the set that is useful for diagnostics, enhanced data is for rest of information that is not specified by the government regulation. Enhanced is vehicle specific. The OEMs usually publish the access methodology even to enhanced, but are not required to. The best source for this data (if you are a hardware / software developer) is via ETI industry group. This is not a trivial support matter. It takes much effort to maintain the support for just one vehicle, never mind the large variety of vehicles that are common or exist.
The best way is to use a commercial product and program to that product's API and let the scan tool program deal with the issues of communicating and translating the data into human speak.
There are also multiple modules on each vehicle that provide other services. Transmission, then Body, then Antilock, then Airbag, then key /entry modules, etc. from most popular data to less popular (from a diagnostic support perspective).
Most of the controllers also have bi-directional support to aid in diagnostics. For example, turn the fan relay on, move the idle up/down (AIS motor), turn the A/C compressor relay on, etc.
Native programming of the ECU (the "Flash") is where settings like ignition timing, fuel control (including limiter functions) are programmed and are not resettable via the diagnostic connector without changing the core coding. This is usually encrypted for security and requires significant expertise to modify.