Pakistan cannot join China. India views it as its territory and China should not accept an union with Pakistan. But they can remain as close buddies. Both China and Pakistan already have their own respective family so they now need friends.
Pakistan made a grave mistake during its independence, it should have swapped East Pakistan with India for West India territory. Like this they territorial size will sort of match. Then the people in East Pakistan have no affinity string tied to the people in West Pakistan which made any union difficult.
As for Iran, it is too far away. Again it is better for China to have a good Persian friend. Its not about the religion. Honestly West Asia is the home of majorities like the Jews, Turkish, Persian and Arab. Let it be that way. Sometimes more is not necessarily better.
However for Iran it should go secular and modern to attract the young. In terms of religion, it should draw a peaceful road map for co-existence. Centuries ago people take horse/bull-cart to travel from one place to another, today its already different, hence religion wise things have to be different too. Be more open and free like France. Then it should encourage comprehensive pro-efficiency in English and Mandarin for global business. Only with such repertoire will Iran be attractive to the world and honestly this is the best defense. If Iran is to arm itself up to match the US, its neighbours will be frightened to US' side and this will make it easy for US to raise allies to attack Iran. US will never let Iran arm itself up as US already have headache with Russia and China. Hence Iran can reach certain military strength but it won't be a match for the US. The best defense is still the presence of international businesses who wants to be in Iran and who can lobby the world for Iran.