Three weeks ago Israeli soldiers with loudspeakers drove through the Ayn Hulwah Palestinian refugee camp in Sidon in southern Lebanon before dawn and ordered all males over 12 to assemble at the hospital.

On a muddy street amid acres of rubble -- the remains of homes bombed or blown up by Israeli forces -- a masked man studied the faces and picked about a hundred out of the several hundred present. About half were bundled off to the Ansar detention camp 12 miles to the south, apparently as suspects in the shooting of an Israeli agent the day before, according to United Nations officials and camp residents who described the incident.

In Israeli-occupied southern Lebanon, the Palestinians are a subordinated and frightened people. Neither Israel nor the Lebanese government wanted to encourage their presence, with the result that the decision to erect tents to shelter them for winter was delayed by two months, and the tents still have not gone up.

The Palestine Liberation Organization guerrillas who once dominated broad stretches of roads and countryside have been killed, imprisoned or evacuated since the Israeli invasion June 6. Christian residents of Sidon and other southern Lebanese villages, questioned during a visit there last week, said they were happy that the Palestinian guerrillas are gone and PLO rocket launchers and artillery no longer threatened settlements in northern Israel. Meanwhile, the Palestinian populace has lost the protection that the guerrillas once provided.

"If the Kataeb Christian militiamen come, they will kill us all," said an elderly man leaning on a wooden stick next to a vegetable stall in the camp.

Israeli officials have pledged since the Beirut massacre to keep hostile gunmen out of the camp, and residents confirm that they have not seen any Christian militiamen recently. No guards were seen at the camp entrance on two visits last week, however, and only an occasional Israeli jeep passed through.

Approximately 60,000 Palestinians are living in the south, concentrated in five camps around Sidon and Tyre. They find shelter as squatters in schools, shops or unfinished buildings.

Many are supposed to spend the chilly, rainy winter in tents, under current plans. U.N. relief officials had planned to start erecting tents last week after spending more than two weeks bulldozing rubble to clear land, but the work once again was delayed when some residents claimed to own the land where the tents were supposed to be put up.

Initially, both the Israeli and Lebanese governments opposed even the erection of tents. But as no alternative was found, and as pressure built both in Israel and in world opinion, both sides agreed to allow tents, and the Israelis now say they would permit construction of permanent housing. The Lebanese, however, oppose anything more permanent than tents because of fears that the camps would become a target again for an Israeli invasion, according to officials familiar with the situation.

The future of the Palestinians in the south hardly could be less clear. The Lebanese government reportedly is considering a plan ultimately to send most Palestinians in Lebanon to other Arab countries, as it shipped away the PLO guerrillas from Beirut under pressure of Israeli guns.

President Amin Gemayel announced Saturday that he plans to visit soon several Arab countries where this proposal could be discussed. Given the difficulties in persuading the Arab countries to accept fewer than 15,000 PLO guerrillas, however, it seems unlikely that there would be a willingness to take in the approximately 500,000 Palestinians living in this country.

The case of Palestinians residing in the south suggests that they are the least likely ever to be evacuated. Most are described as having legal residence papers and as having come to the country following the 1948 Arab-Israeli war. They thus are seen as having more of a right to stay than the estimated 250,000 without papers who have come only since the 1967 war and live mostly in Beirut or the north.

Many Palestinians in Ayn Hulwah were born in Lebanon and have known no life elsewhere. Despite the ban on constructing new homes, some are repairing old ones damaged by shelling when Israeli forces seized the camp in the early days of the invasion.

"I have a shop, a home," said Mustafa Ghazi, who has nailed planks over a hole in his house caused by a blast. "I don't want to go to Jordan," he said, referring to President Reagan's proposal to create a Palestinian entity linked to Jordan.

Ghazi's two-room house is crowded now that his brother, Kamel, has moved in with his wife and nine children. Kamel said his house was blown up by Israelis after the camp was captured because it had a basement that the Israelis feared would be used by guerrillas as a hideout.

Israeli officials deny that any homes were dynamited in Ayn Hulwah, saying that the damage all was caused by shelling during the initial fighting with PLO guerrillas. U.N. relief officials say the Israelis both dynamited and bulldozed homes, apparently to encourage the Palestinians to flee.

For the Palestinians in the camps, safety is a major worry. The presence in the area of the militias of the Phalangists and former Lebanese Army Maj. Saad Haddad has expanded. Haddad's troops, confined to a narrow strip along the Israeli border before Israel invaded, now man a checkpoint with Israeli soldiers on the northern edge of Sidon.

Israeli officials say they hope that the Lebanese Army eventually will guarantee security in southern Lebanon both for the Palestinians and for Israel's northern settlements. The Army has been largely ineffectual, however, since it split along Moslem-Christian lines during the 1975-1976 civil war. It currently is stretching its resources just to police Beirut and its immediate environs.

The U.N. Interim Force in Lebanon, now 6,000 strong, might play a new role in the south. The U.N. Security Council altered its mandate last Monday so that the Lebanese government could authorize it to operate outside the boundaries that have limited it until now, U.N. force officials say.

Israel, which accuses the United Nations of pro-Palestinian sympathies, opposes a role in southern Lebanon for U.N. or any international forces such as the U.S.-French-Italian force now in Beirut.

Meanwhile, Israel is doing its best to prevent a PLO revival. Israeli officials, noting that a grenade attack near Tyre Oct. 17 wounded two Israeli soldiers, say PLO guerrillas still are operating in the area.

"They are here, and we are looking for them. It takes some time," said Lt. Col. Aron Gonen, the spokesman for the Israel Defense Forces' Assistance Unit for Civilians in southern Lebanon, speaking there last week.

Gonen said he personally had not witnessed the selection of suspects by a masked person -- apparently an informer from inside the Palestinian camp--but acknowledged that it was "possible."

Gonen said that the authorities at the prison were trying to find out which suspects were actively involved in guerrilla attacks. These would not be released and perhaps would be evacuated to another Arab country, while the rest would be freed, he said.

Two residents of Ayn Hulwah who said they recently had been released from Ansar -- a middle-aged man with white hair and a red-haired 19-year-old -- said that they had been beaten at first but that their treatment later improved. They and other residents said the roundups had netted some people who worked with the PLO but that many who were not involved also were seized.