Let's say I have either Leyline of the void or Rest in peace out and bob runs any one of the cards say if X be put into a graveyard from anywhere, instead shuffle it into the player's library". What exactly happens? Does Bob get to chose where it goes?
In general, if two replacement effects would affect where an object would go, the object's controller (or its owner if it has no controller) chooses one of them (and the other effect happens if it now applies to the replaced event) (C.R. 616.1, 616.1d-e). For example:
If you control Rest in Peace and a Blightsteel Colossus on the battlefield, controlled by an opponent of yours, would go to the graveyard, that opponent chooses whether Blightsteel Colossus is exiled or is revealed and shuffled into its owner's library instead.
If you control Rest in Peace and an opponent of yours discards a Blightsteel Colossus card, that opponent chooses whether Blightsteel Colossus is exiled or is revealed and shuffled into their library instead (review C.R. 701.8a).
Replacement effects that deal with the graveyard