Loitering With Intent…
Loitering. There are many ridiculous offences under this. However, the full text of the charge that I am more inquisitive about is "Loitering with intent to commit a felony", which simply means a person has evil thoughts and is hoping for a chance to commit a crime. You can already sense the absurdity in this. Maybe you are one of those people with a stance, mien or even those strides that make passers by fear for dear lives? If so, I’m very sorry for you.
On a lighter note, how can you get off this derisory charge? But before that it is prudent to look at the proof - standard of proof- being beyond reasonable doubt. Reasonable doubt is not mere possible doubt. It is that state of the case which, after the entire comparison and consideration of all the evidence leaves the mind of the court in that condition that it cannot say it feels an abiding conviction to a moral certainty of the truth of the charge (Philip Muiruri Ndaruga v Republic  eKLR).
What this simply means is that the prosecution who has the burden of proof, should be certain with the evidence for lack of better terms it should be good enough (water tight)
Now let’s get into the substance of getting you off this charge of loitering with intent to commit a felony.
Fortunately, this is an arduous crime to prosecute. The main drawback I would say -for you being an advantage- with prosecuting this charge is that it requires the prosecutors to actually prove that you intended to commit a felony. Generally speaking, this means that you won’t be charged unless you were in certain circumstances that depict you were attempting to commit a felony.
For example, you were walking in a street/road that is known to have criminals or rather criminal activities do take place there, you are “dressed as a criminal” or even in a company of individuals that “appear” to be criminals, have criminal records or even hanging around a place and acting in a suspicious way this may be enough evidence for the prosecution to argue that you had intention of committing a felony.
Worry not this are mere circumstantial evidence (evidence based on inference and not on personal knowledge or observation) that can be fought with simple arguments. The thought behind this is, this type of evidence must always be narrowly examined, if only because evidence of this kind may be fabricated to cast suspicion on another (Teper v R  AC).
The earlier mentioned instances are innocent circumstances. Each matter is unique and requires an individual approach and strategy. Your arguments are key to get you off this charge.
For instance you are arrested in town at night; alone or even in the company of your friends there are several defenses you could raise.
1. Demonstrate that you were not loitering- you were on a mission to accomplish something of importance.
2. You have a lawful reason for your conduct- cite an instance that will demonstrate/show that you had a lawful reason to conduct yourself the way you did.
3. Show that you had no intention to commit a crime- try to omit/eliminate the mens rea part of a crime.
Of course, many defenses to this crime can be negated by what you say to the police when you are arrested and that’s why you should exercise your right to remain silent and not to give self-incriminating evidence. Remember, it is not your burden to prove anything.
As they say in Latin, ex nihilo nihil fit (out of nothing comes nothing).