It will be much cheaper for you to do all on TG and you may book for them on TG's own website. TG has daily flights from ICN to HKG and then continuing to BKK, or direct. What you may do is choose a return with stopover in HK on return. And either forgo the last leg HKG-ICN or choose your return on SQ SFO-ICN-SFO.
Then just do a seperate BKK-HKT-BKK sidetrip.
Choose Korea as country.
www.thaiair.com
Please note however TG might just give you a fare in V or W class that does not earn any miles. So you might want to call TG's ICN office to ask how to rebook into a mileage earning ticket.