When 12-year-old Isaac Raboyame disappeared during the unrest that shook this black township south of Johannesburg last month, his grandmother was frantic.

For four days Eva Raboyame, 72, with whom the boy lives, searched the ghetto's dusty streets looking for him. He was nowhere to be found.

Then word reached Raboyame that her grandson had been arrested and was in police custody. For more than three weeks, the 12-year-old was kept locked in a cell at the nearby Vereeniging Police Station. On Sept. 28 a court ordered his release and a lawyer took him home.

Young Isaac is one of dozens of children who have landed in prison cells as the South African police have sought to quell the disturbances that have erupted during the past month, according to lawyers involved in the cases.

Their tactics have been to detain large numbers of people for several weeks while interrogators seek the "agitators" they believe must be behind the unrest.

The process, itself rough-and-ready in the midst of the disturbances, has been accompanied by many allegations of brutal treatment in the cells.

A police spokesman in Pretoria, Lt. H.J. Beck, said last week that he did know how many children had been arrested since the unrest began. Asked why children as young as Isaac Raboyane were kept in custody, Beck said: "When you arrest someone in the street you can't just warn him then and there to appear in court. They are kept until their parents can be traced, then they are released into the custody of their parents."

Lawyers handling the cases estimate that as many as two-thirds of the 2,000 or more people who were arrested during the unrest have been under the age of 18.

Isaac Raboyame said there was another 12-year-old, Sile Matsile, in the cell with him. Lawyers involved in the cases say they know of a boy of 9 and another of 10 who were detained, and "quite a number" aged 12 to 14.

The unrest in the black townships during the past month, like that in Soweto in 1976, when more than 600 persons died, has been largely a revolt of the young. Students have taken the lead in demonstrations protesting what they regard as their inferior system of segregated education, and a new constitution introduced by the white-minority government that extends limited political rights to some nonwhites but not to the black-majority population.

The students also have been boycotting classes, and last week all black schools in Johannesburg and the heavily populated areas to the east and south were empty. More than 220,000 students were said to have joined the boycott, which continued Monday amid new clashes between police and protesters.

Youngsters like Isaac Raboyane are a different matter, however. He is in the third grade.

On Friday Isaac was playing soccer in the street outside the overcrowded matchbox house where he lives with his grandmother, three small cousins and another family of five. His father is dead, and his mother works as a live-in servant for a white family in another town.

He is small for his age and seemed afraid when a white reporter arrived to ask him about his experience in custody. But one of the adults living in the house took him on his knee and, reassured, the boy told his story.

He was going to play with a friend, he said, when suddenly he found himself in the middle of a mob that was being charged by riot police. Isaac said he tried to run, but a police officer grabbed him and shoved him into the back of a van.

The officer hit him on the head with a rifle butt, Isaac said, taking off a brown woolen cap to reveal a gash that still has not healed.

"I was very frightened," Isaac went on, "and I cried when the man hit me." At the police station, he said, he was locked in a cell with seven other persons. He and Masile were ordered to clean the cell each day.