Yeah, I think we have to be a bit careful here.
I looked this up and the way it's been reported isn't massively helpful, in that it's pretty easy to read it as the kid didn't stand trial because he's got ADHD, when they've actually said that's one of a range of unnamed conditions they'd got.
My missus used to do a lot of work around cognitive and capacity assessments and though you cannot read that much from how the story was reported, it's quite possible that the ADHD didn't have much to do with the decision (people with ADHD are overrepresented in the prison population so that's definitely not a reason to not prosecute in itself). It's all about capacity at the end of the day - the media over simplifies things and makes it appear to the reader that there are 'get out of jail free' cards where having a condition (often erroneously lumped into a broad brush 'mental health' category) means you can get away with anything, and it's simply not the case.
There's any number of things that might be taken into account in determining whether someone has capacity to stand trial, but it boils down to do they have capacity or not?
It's interesting and probably significant that in the report I read "three doctors" had agreed on whatever assessment had been made - that's pretty thorough, this isn't being done on the view of some overly idealistic hippy support worker or something (apologies to any support workers reading) and is not a decision that would be taken lightly.
Another thing that's massively unhelpful about the reporting is - and this becomes more and more of an issue as such stories get shorter and shorter (is that because of ever reducing attention spans or because journalism and actual reporting has been hollowed out to the extent there isn't anyone to actually write them anymore?) is again what isn't reported. The story reads as if they weren't fit to stand trial and that's that, end of story, everybody walks away when that probably isn't the case. There are inpatient mental health units and secure hospitals throughout the country full of folk deemed to be a danger to themselves or others, some of whom will have convictions but a lot of whom will not.
I've not a clue what happened after the trial decision but the idea that you've got someone that will start a fire in a building with people in it AND has been deemed not fit to stand trial is not a combination where the system says 'nothing to see here, carry on' - just because they've not gone down the criminal justice path doesn't mean they are not still in the system