Actually a bitcoin address doesn't differ that much from a RIPEMD 160 result. It's just encoded with base58.
There's a little more to it than that. To turn a RIPEMD160 result in to an address, you first need to add a prefix byte (00 for P2PKH addresses, 05 for P2SH addresses), hash that number using SHA256 twice, add the first four bytes of the result to the end of the previous number, and then encode
that number in Base58.
each private key starts with 5H, 5J, 5K
if I take all private keys beginning with 5H all bitcoin addresses would be there?
If you take all the WIF private keys which start with 5H, and convert them to hexadecimal, they are between the following two numbers:
0000000000000000000000000000000000000000000000000000000000000001
and
1853E65BF4DDC28AA8C27A71F65671928ED6E1D612946BB3E94B8B36E5E9FFFF
This is approximately 2
252.6 private keys (and around 9.5% of all possible private keys). So theoretically yes, there will a private key in there which would give every legacy address, of which there are "only" 2
160.