"The logic of complete freedom leads to the madhouse," Simon Rattle recently said in his television programme about 20th-century music. It wasn't easy to see from the context exactly how we should read this remark - was it merely a paraphrase of Schoenberg's anxiety, an attempt to describe the vertigo of a composer newly liberated from traditional harmonics? Or were we to read it as a self-evident statement of truth? Plenty of people would happily subscribe to the latter view, in particular those who think that the tidal ebb of aesthetic obedience in the current century has exposed a slimy expanse of junk-dotted mud. It is very easy to turn the remark from a reminder that the true artist is always disciplined (even if they invent a new discipline) into a philistine sneer at artists whose work is not underwritten by traditional methods - a different way of saying that the lunatics have taken over the asylum.

Rattle's remark came to mind when I was looking at Antony Gormley's Field, a startling and thought-provoking installation at the Hayward Gallery. The work consists of around 40,000 little clay figures, crudely moulded into a rough approximation of a body, each with two indented holes for eyes. What makes people gasp when they face the room in which these homunculi are arrayed is not the quality of each individual figure. You could say of them, calling up another commonplace aggression against modern art, that "my six-year-old could do that". Indeed, this judgement is incontrovertible - Gormley used ordinary people to help make his figures, including children, whose smaller hands have produced infants for this wondrous population. But what exactly would you think if your six-year-old had done this - if every spare minute was bent to the creation of little figures, which were then neatly arranged in a bedroom to cover all horizontal surfaces? You would, surely, call a psychiatrist, even if your parental indulgence lasted beyond the 1,000 mark. Encountered anywhere but in an art gallery such behaviour - obsessive and fixated - would call for a clinical explanation, not a critical one.

This is not to argue that Gormley is deranged (though, like many artists, he may like to think of himself as not quite as sane as the next man) but it is to suggest that one of the features of the art of this century has been a readiness to see that psychosis might have things to tell us. And in the case of Field, the absence of reasonable limits delivers surprisingly rich dividends. This piece isn't just marvellous to look at - it stirs in the viewer thoughts of megalomania, benevolence, dread and cruelty (judging from overheard conversations, I wasn't the only one who felt an impulse to run into the room and trample these tiny, beseeching figures).

And there are incontrovertibly great artists who have gone even further in the pursuit of a single goal - both Mondrian and Giacometti might serve as examples of artistic compulsion that could easily look deranged if the inspection had different motives in mind - if the viewer was a psychiatric social worker and the paintings and sculptures were to be found in a cluttered bed-sit. Both those artists worked with traditional media but the almost limitless definition of what might now count as art has greatly expanded the repertoire of derangement. It isn't very difficult to find a contemporary artist to match almost any pathological symptom. Some mentally ill people collect their own faeces - so did Pietro Manzoni, in numbered tin-cans which he then sold to collectors. Some people suffer from a condition called dysmorphophobia, addictively visiting plastic surgeons to alter their appearance - so does the artist Orlan, who records her grisly transformations on videotape.

This raises an obvious problem of discrimination. Coming out of the Hayward, I passed a homeless man pushing a railway trolley stacked with an office chair and a section of timber-veneered partition wall. Given an articulate rationale about these objects - an interest in "the fragility of the permanent", say, or an exploration of "communal loneliness" - as well as a gallery willing to endorse his vision, there is no reason why such an assemblage might not figure as an art installation. Indeed, the reason why most galleries would probably refuse is that it would be a bit old hat. Been there, done that.

Such facts are taken by conservatives as evidence for the general debasement of contemporary art. They aren't, but they do suggest that the viewer's duty of judgement begins rather earlier than it did in the 19th century, when the threshold question was not "Is this art at all?" but "Is it any good?" For my money, Orlan urgently needs to see a doctor, not another surgeon, but such cases shouldn't blind us to the fact that for some fine artists, "the road to the madhouse" has turned out to be a fascinating excursion, not a hideous wrong-turning.

From next week, this column will appear on Thursdays