I haven't used Steam for games that aren't on Steam, but at least for Steam games, Steam uses a SteamLibrary folder (the one a specific game is installed under). The steamapps folder you mention is indeed the default directory, so probably the place where things go by default, but it might be a different SteamLibrary folder if a different one is set as the default.
The numbers are just the store/app ID (the one you see on store page URLs), so no clue what it does for non-Steam games. I've heard that the longest numbers are for non-Steam stuff, but not sure if that's true.
Edit: Also, handy to mention, a tilde (~) is automatically the home directory, and might be quicker/easier for navigation than using the root path.