So if Rayami, First of the Fallen is your commander and has yet to be played, does his ability still exile creatures that would normally be destroyed, or does he have to be on the battlefield for that to happen?
Creatures will only be exiled by that ability if Rayami is on the battlefield.
In general, abilities on permanent cards only function while the card is on the battlefield. There are some exceptions, but they mostly boil down to "Does the ability only make sense in another zone, or specifically say that it works in another zone?" The details are in rule 113.6.