Breaking Bad - ize any string (compression)
JavaScript (ES6), 327 bytes
s=&gt;s.replace(RegExp([...a=&quot;HHeLiBeBCNOFNeNaMgAlSiPSClArKCaScTiVCrMnFeCoNiCuZnGaGeAsSeBrKrRbSrYZrNbMoTcRuRhPdAgCdInSnSbTeIXeCsBaLaCePrNdPmSmEuGdTbDyHoErTmYbLuHfTaWReOsIrPtAuHgTlPbBiPoAtRnFrRaAcThPaUNpPuAmCmBkCfEsFmMdNoLrRfDbSgBhHsMtDsRgCnNhFlMcLvTsOg&quot;.match(/.[a-z]?/g)].sort(s=&gt;-!!s[1]).join`|`,'g'),s=&gt;`[${s+-~a.indexOf(s)}]`)

Try it online!
How?
The data string consists of all element symbols concatenated together, from lowest to highest atomic number.
&quot;HHeLiBeBCNOFNeNaMg...LvTsOg&quot;

We split it into a list a[] of 118 entries with the following regular expression:
 +------&gt; any character (always a capital letter)
 |   +--&gt; optionally followed by a letter in lower case
 | __|_
 |/    \
/.[a-z]?/g

We create a copy of a[], put all single-character elements at the end of the list and join with pipes:
[...a].sort(s =&gt; -!!s[1]).join('|')

Which gives:
&quot;Og|Ts|Lv|Mc|Fl|Nh|...|He|H|B|C|N|O|F|P|S|K|V|Y|I|W|U&quot;

We turn this string into a regular expression and apply it to the input string. Each matched sub-string s is replaced with the pattern:
`[${s + -~a.indexOf(s)}]`