system/core/include/private/android_filesystem_config.h contains the list of user user id’s mapped to numbers and this code gets included
when building bionic. A bit lower in the file you will find the DEFINE → group name mapping. This is a one to one mapping so AID_VPN(id 1016) is the group called “vpn”.