United Nations, N.Y. — There are solid indications that Soviet diplomats and experts are studying the elements of a package that would allow the Soviet Union to withdraw its troops from Afghanistan.
Such a possibility, which has been strongly suggested in the past, is still not ''around the corner,'' but diplomats and some observers now see it on the horizon. ''It may blossom as early as 1984,'' says one official.
''Don't expect anything dramatic, or any sudden announcements. For the Soviet Union to withdraw from Afghanistan without loss of prestige and without hurting its national interest, is every bit as difficult as it was for the United States to get out of Vietnam,'' says a high Western official with cabinet rank.
''Such a solution - in fact a return to the situation prevailing 10 years ago - can only be implemented when and if the international environment in which the Soviet Union is operating will have improved,'' says an informed high-ranking diplomat. ''In other words, when the Soviet Union and China will have to some degree mended their fences and when relations between Moscow and Washington will have markedly improved,'' he adds.
An improvement in US-Soviet relations is a cornerstone of any political solution of the Afghan crisis, in the opinion of most observers. The cool US-Soviet relations, made cooler under the two years of the Reagan administration, may begin to thaw under the guidance of the new US Secretary of State, George Shultz, some analysts believe. But many suggest that a post-Reagan era may be needed for any change to occur.
What has helped spur Soviet interest in an Afghan settlement is a a major reshuffling of the cards among Asian nations around Afghanistan. Almost simultaneously, the various relationships between the Soviet Union, China, India , and Pakistan have become warmer.
But while the Soviet Union is now studying the nuts and bolts of a solution, conventional wisdom here has it that a Soviet pullout of Afghanistan will in effect occur only after a deal has been struck with the US much in the manner in which the US pullout of Vietnam began after President Nixon's trip to Peking and Moscow.
Meanwhile, the guerrillas have extracted a heavy price from the Soviet Union for its occupation of the country and Moscow's prestige in the third world has been tarnished as a result of this venture.
''Moscow would like to extricate itself from Afghanistan and cut its losses. This helps explain why it has softened its stance with regard to the UN's good offices,'' says an analyst.
''The questions to which Moscow is seeking an answer are these: how to put in place a regime acceptable to the Afghan people and not hostile to the Soviet Union; how to pull out Soviet troops and make sure Afghanistan does not turn into an anti-Soviet launching pad; how to model Afghanistan after Finland rather than after, say, Turkey.''
A Soviet ''package'' for Afghanistan, according to informed officials here, would include:
* The withdrawal of Soviet troops.
* An international agreement on noninterference in Afghan internal matters.
* Afghanistan's strict neutrality.
* A measure of self-determination for the Afghan people and a nationalistic, moderate regime not hostile to the Soviet Union, to Pakistan or to China.
United Nations Secretary General Javier Perez de Cuellar has actively tried to bridge the differences among Afghanistan, Iran and Pakistan in what is known as ''tripartite proximity talks.''
Two years ago Pakistan wanted no part in talks with Afghan officials and Moscow showed no interest whatsoever in discussing the matter. But at a Geneva meeting last June, the representatives of Pakistan, Iran and Afghanistan agreed through the offices of Diego Cordovez, UN Secretary General Perez de Cuellar's special envoy, on the following points:
* An agenda for the talks would comprise (in no particular order): withdrawal of foreign troops; the return of Afghan refugees; noninterference in Afghanistan's internal affairs; international guarantees to protect Afghanistan from its neighbors and its neighbors from itself.
* The talks would continue after Geneva with Cordovez shuttling between the capitals.
* These talks should be secret.
* They do not imply Pakistan's recognition of the present Kabul regime.
* Iran is to be kept informed of the talks but not directly involved in them.
When Perez de Cuellar visited Moscow last summer, Gromyko reportedly showed interest in his efforts and later, in September, in his speech at the UN, Gromyko referred to them as ''moving into the right direction.''
Cordovez is to travel to the area again next January and resume his shuttles between Islamabad, Kabul, Tehran. Meanwhile at the UN, the General Assembly is expected to renew its call for ''the withdrawal of foreign forces from Afghanistan and the self-determination of the Afghan people.''
''In fact, what we are witnessing behind the smokescreen of the tripartite talks is really a bilateral Pakistan-Soviet Union dialogue,'' says a well-connected diplomat.
''Pakistan has made a dramatic recovery in the last two years. It was on the verge of economic collapse. As a result of the murder of (former Pakistan President Ali) Bhutto, its regime was seriously discredited. Through a dynamic and subtle diplomacy, by sending the right signals to Washington, Delhi and Moscow, it has been able to receive substantial economic aid from the US and at the same time improve relations with both India and the Soviet Union,'' he adds.
Pakistan President Zia ul-Haq's scheduled state visit to New Delhi next week may result, in the view of some, in a lessening of Pakistan's dependence on China. He is due in Washington in early December. Pakistan succeeded in reducing Soviet pressures at its borders by adopting a moderate stance and by not insisting that the refugees be included in the tripartite talks.
''Indeed, Pakistan has lent a deaf ear to the US which kept cautioning it against participating in these talks. And while some people believe that the tripartite talks are a device used by Moscow to lull critics of its occupation of Afghanistan to sleep, others are convinced that the Reagan administration is not really interested in a Soviet pullout from Afghanistan since it would lose a powerful propaganda weapon against Moscow and since it wants the Soviet Union to continue to bleed in Afghanistan,'' says the same diplomat who has been closely involved in the Afghan crisis.