I have Rakdos, Lord of Riots, Razaketh, the Foulblooded and Kozilek, Butcher of Truth in play. I have done at least 10 damage so Kozilek would be free to cast. Can I sacrifice Kozilek to Razaketh, and before I actually find a card Kozilek has shuffled himself back in and I can tutor him up and cast him again, effectively having "pay 2 life, draw 4 cards" on the field. Does this work how I want to?
Yes, When you sacrifice a creature to Razaketh, it's ability goes on the stack, after that the dying trigger of Kozilek goes on the stack and since the last thing on the stack resolves first, your graveyard will shuffle in your deck and then you can find your deck for a card.
Look at the wording on each card:
Razaketh, the Foulblooded
Pay 2 life, Sacrifice another creature: Search your library for a card and put that card into your hand. Then shuffle your library.
Kozilek, Butcher of Truth
When Kozilek, Butcher of Truth is put into a graveyard from anywhere, its owner shuffles their graveyard into their library.
And this for the target example:
Choose target card in a graveyard other than a basic land card. Search its owner's graveyard, hand, and library for any number of cards with the same name as that card and exile them. Then that player shuffles their library.
As explained by the person above, when you activate Razaketh it tells you to search for a card, it doesn't tell you to "target" the card.
If the wording on Razaketh was "target non-land card in your graveyard, search library for a copy of this card and put it into your hand" this wouldn't work as kozilek wouldn't be in the graveyard at the point when you would need to target.
If the word "target" was there, you would need to choose the target at the time of activating the ability, at that time kozilek woudn't be in your library so you couldn't target it (theoretically you can never target something on your library as you don't see it so you can't "point" at it) if Razaketh wording was "name target" before searching, it would still work as you would name the card on activation but as when kozilek is sacrificed it would die, be shuffled back into library, then the card would be on your library.