shuffle_with_constraints function

Shuffling proposal function with constraints.