Is there an English idiom that means "you can always find a law to convict anyone"?
A good prosecutor can indict a ham sandwich.
The original phrase, attributed to New York judge Sol Wachtler, from 1985, went something like this:
“[If a district attorney wanted, a grand jury would] indict a ham sandwich.”
It was immortalized in the Tom Wolfe novel "Bonfire of the Vanities" (1987).
The phrase succinctly summarizes the state of legal affairs where a prosecutor can find some law written somewhere that even the most well-behaved citizen has broken.
Update
For those who think that being indicted is less severe than being convicted, you may want to become familiar with the process and its consequences, as described in Ham Sandwich Nation: Due Process When Everything Is a Crime (Glen Reynolds, Columbian Law Review, July 8, 2013) on how prosecutors might pick the laws they choose to indict under in order to obtain likely conviction. In the end, this can make indictment vs. conviction a distinction without a difference. This is exactly what the OP is describing.
Taking the quote from the article:
It would then be up to the junior prosecutors to figure out a plausible crime for which to indict him or her. The crimes were not usually rape, murder, or other crimes you’d see on Law & Order but rather the incredibly broad yet obscure crimes that populate the U.S. Code like a kind of jurisprudential minefield: Crimes like “false statements” (a felony, up to five years), “obstructing the mails” (five years), or “false pretenses on the high seas” (also five years). The trick and the skill lay in finding the more obscure offenses that fit the character of the celebrity and carried the toughest sentences. The, result, however, was inevitable: “prison time.”
So, if the prosecutor wanted to convict someone, then some obscure crime with a severe penalty would be found that would apply.
The one that springs to mind immediately is:
If you give me six lines written by the hand of the most honest of men, I will find something in them which will hang him.1
It is translated from French, allegedly by Cardinal Richelieu, and I have seen it used in English to indicate how easy it is for authorities to secure a conviction on vague charges.