You should be able to imprison anyone in your family except for your children without penalty if I remember correctly.
That's correct. You can imprison any male of your dynasty,
with the exception of your current ruler's sons, without penalty. As for your sons... well, that's the point: if you could just imprison everyone, there would be zero purpose to the mechanic. Instead, throw them on your council, give them land, eat the tyranny penalty, or eat the decadence gain. If you're lucky, maybe you'll catch them plotting and can imprison them.
But you can also work to mitigate that decadence rolling in: observe Ramadan every chance you get, keep your personal demesne low, and when you're at war make sure you've got family members leading troops (in the flanks/center, not just randomly on the field), and that they're in charge of sieges. If you're really lucky, the less useful ones will get promptly killed by some self-righteous Crusader jerk.
As your empire starts to sprawl a bit, decadence will grow quicker and if you're not gaming it by ignoring the prestige penalty and have four wives, you'll have tons of extra sons. Should you ever find yourself in a position that you have a long-lived Sultan and he's still popping out sons that are reaching adulthood, and you've got too many to effectively fit on your council... then give as much land as you can to the one you want to be your heir, and then give enough land to keep their decadence only trickling in
to your shittiest sons. Should you be strong-armed into landing more than one son, then it'd be wise to insure that the other landed sons stand as little chance as possible at ever gaining any support for the throne.