Some of the meta data comes from the file's ordinary metadata (e.g. creation date, and similar), other parts of the meta data comes from so called extended file attributes, and some again are from other sources (such as the file's data fork).
On HFS+ a file's basic meta data is stored inside the catalog record (creation date, content modification date, etc.). HFS+ also supports attributes, which can be stored in a special file known as the "attributes file" that holds key/value records. The attributes file itself consists of a single fork.
Only smaller attributes are stored inline. Medium sized attributes are stored in up to 8 extents pointed to by a fork data attribute record. Larger attributes (known as extension attributes) have a list of extents managed exactly like a resource fork.
The naming here can be a bit confusing. Initial versions of HFS referred to this same structure in the file system as "named forks". Only later were they renamed to "extended attributes". The main difference being the type of API used by applications to access the data.
So in essence forks are still very much used on OS X. However, the specific "resource fork" as managed by the Resource Manager API is deprecated, as you describe.
For macOS, we have moved away from HFS+ to APFS. With APFS, resouce forks are stored as an extended attribute named "com.apple.ResourceFork". However, they are still treated specially by the file system, as inodes on APFS (similar to catalog records on HFS?) have a specific flag to state that a resource fork exists. Other extended attributes do not have such a flag.
Note that other parts of the metadata can come from a wide range of data sources - some stored on disk, others generated upon import (for example by consulting cloud services when dealing with files stored in iCloud or similar service).
mdls
uses the Spotlight API in order to retrieve the metadata for display. The Spotlight API draws upon sources such as file system data, file system meta data, extended attributes, and many other places. In particular it has a system of importer plugins that are responsible for parsing various file types, contacting various cloud services, etc.