Will there be a problem for me arriving in the US if I arrive from Pakistan rather then Thailand where I received my B1/B2 visa?
In most cases the immigration officers do not know where you come from when you show up at their desk, as people coming in on several flights arrive at once.
Besides, visa do not include prescribed flight routes, you could have found a better deal with an airline that goes through Pakistan which is a very common thing.
So, no, it does not matter as long as your passport and visa are correct for your stay.
You can not apply for visa if not resident in most countries now but in the past you used to get a visa for the next country from the one you where, or for one a few countries ahead, traveling any way you could.