Where are the User and Group definitions stored in High Sierra?
The user and group information on a Mac are stored in Directory Services. That service can bind to external sources and alternate "local" sources like NFS, LDAP, ActiveDirectory (LDAP) but by default, unless you opt in to a directory - the user and group database is locally managed.

You can find the default local files in /private/var/db/dslocal/nodes/Default/groups and users. They are stored in binary plist format so you need to use /usr/libexec/PlistBuddy or similar to read them.

Alternately, you can use the easier method of the dscl utlity which allows you to read and change Directory Services entries. Using dscl has the added bonus of reading any of the optional sources in their preference to retrieve this information the same a program would.