This essay is not about international relations between Pakistan and Israel, though that would also be an interesting topic. This essay looks at the remarkable similarity of the creation of modern Israel and Pakistan and relates that to the two nations' very similar internal and external problems.
Israel was founded in 1947 when the newly-formed United Nations voted to partition Palestine into two states, one Jewish and one Palestian. Prior to that Palestine had been a British colony, or mandate if you like a prettier term for brutal foreign occupations.
Pakistan was founded in 1947, a few months before the founding of Israel. It had been agreed to partition the Indian subcontinent into two nations, one Islamic and the other Hindu (though the leaders of both nations tended to secularism). Prior to that the Indian subcontinent had been a part of the British empire.
Isreal was largely the product of migration. The city of Jerusalem had a substantial number of Jewish residents under the Ottoman Empire. Beginning in the 1800's Jewish migration to Palestine grew, then it speeded up greatly in the 1930's, angering Arabs and resulting in the British imposing strict quotas on Jewish immigration in 1939. After that illegal immigration of Jews to Palestine greatly increased. The creation of the state of Isreal was accompanied by the explusion of many (but not all) non-Jews from the Israeli territory and the rapid increase of its Jewish population through immigration. The key point is that the state of Israel was explicitly created as a homeland for a particular religious sect (or spectrum of sects, since within Judeism there are many rival sects). However, many of the Jews who immigrated were in fact secular, rather than practicing religious Jews.
Pakistan was also created as a homeland for people of a particular religious denomination, Islam. There had been a vigorous debate in India for over a century about what India would look like once the British left. Prior to the invasion by Britain much of Indian had been ruled by Muslims who had invaded centuries earlier. However, most Muslims were actually poorer than most Hindus because they had been converts from the lower castes of Hindu society. In most areas of India, Muslims were a minority. Muslim political leaders knew they would never be the leaders of a united India; they simply would not have the votes, nor the economic leverage. So they angled for a two-state solution. The nefarious British could have left India a united state, and then left the Indians to sort things out themselves. With lines drawn there was massive communal violence, plus many Moslems on the Hindu side of the lines moved to Pakistan and vice-versa. The nation of India ended up with a substantial Moslem minority. Pakistan had a very small Hindu minority as well as other minorities, notably Christian and Sikh.
Israel's problems were apparent immediately, as the new state was a tiny Jewish island in a sea of Islam. Because it was an artificially created state and its creation involved land theft, murder, and the violent expulsion of non-Jews, its mere existence seemed like a crime to Arabs. Others may (and should) sympathise with the Jews who survived the Holocaust, but the Palestinians did not run the Holocaust. The U.N.'s creation of Israel amounted to punishing Arabs for the crimes of Europeans. The Nazis originated in Bavaria, Germany; expelling the Bavarians and making Bavaria a Jewish state might have struck people as a fairer response.
Pakistan was much larger both geographically and in population than Israel, but its leaders probably also felt surrounded by enemies. Their main concerns were the Indians and the Chinese (who within a couple of years would be Communists). Even Persia, now called Iran, had a history of rivalry. In addition significant tribal groups found themselves half in Pakistan and half in Afghanistan.
If Israel has the problem of Palestinian refugees and control of Palestinian majority areas (the West Bank and Gaza), Pakistan has the problem of Kashmir, a Moslem-majority area that had a Hindu monarch and was grabbed by India, then fought over several times.
Both nations have atomic bombs. Both are United States allies, but don't want to be U.S. puppets, and so have a difficult balancing act to maintain.
Both nations have bizarre combinations of modern science and technology combined with substantial minorities of fanatical religious conservatives.
If you want to see what can go wrong if you don't have the constitutional separation of church from state, you have only to look at Israel and Pakistan.