The police said the boy was in stable condition on Friday but did not have any other updates on the extent of his injuries.

His grandmother, Bracha Portnoy, said that the boy was still at the hospital and his family did not yet know when he would return home.

“We’re praying, so that helps us,” she said.

Neighbors said they were rattled by Thursday’s attack, which they agreed was out of character for the area. Gitty Acker, who lives four doors down from the Portnoys, said her grandchildren often visited and sat on her front porch without worry.

“And you know what? I’m going to have to keep them inside,” Ms. Acker said.

Some residents said they had recently noticed an increase in the number of homeless people in the area, including on Metropolitan Avenue.

In the Chinatown attacks, a homeless man , Randy Rodriguez Santos , is accused of bludgeoning four other homeless men as they slept, and leaving a fifth man barely alive.

Mr. Santos had a history of violent and erratic behavior before the attacks on Saturday, the police said. But neither the authorities nor social service providers raised concerns about his potential for violent behavior.

After those attacks, Mayor Bill de Blasio said the city would send more police officers, mental health providers and outreach workers to the community in Lower Manhattan, where residents have raised concerns about a recent influx of mentally ill homeless men who appear to need more intense services.