Custody is key, not cuffs. Cuffs are just an indicator of (but not required for) custody. I don't even really understand what you mean.
Simply put, if you are in "detained or in the custody" of an officer, and that officer has sex with you, it would legally be considered a felony rape regardless of whether you wanted to do it or not. Actual, bona fide custody, not an illegal detainment. Like the officer properly arrests you, and then has sex with you.
What you seem to be talking about is a whole different can of worms.