Ok, 2nd attempt

(you made me feel quite guilty spookyfx)
This approach is a lot more promising. You can create a spell, or an ability. Then, you create a new Magic Effect instance and link it to the spell/ability you just created.
Under Magic Effect window, there is an option called 'Perk to Apply', where you can select
whatever perk you want to apply to
this spell during its effect durationhttp://www.creationkit.com/Magic_Effect#Base_Data
Look for 'Perk to Apply'
Once you link the Perk you want to that spell/ability, what left is to call Addspell on whatever actor you wish to have the perk. Im quite positive that addspell works on any actors. Which I already tested on my horse.
I've already tested this with a perk which is supposed to show bright flame effects, and a perk which is supposed to reduce all incoming damage to 0 (those effects because they can easily be tested), both through the AddPerk function and through what you said, a spell with a magic effect with ''Perk to Apply''. Both methods only work on the player. Also, what you said earlier about making just a spell which simulates what the perk does.. I think that's hard to do in the case of the Deflect Arrows perk, because it's effects are pretty much hardcoded.
Another possibility... and I haven't thought it through since I just realized it... is to script an unnoticeable ward spell to activate whenever an actor blocks. In the CK, there is a Collision Layer list under Miscellaneous. You could add "L_Projectile" to the "L_Ward" list.
I've never played with them, but if it acts how I think it would, it would cause arrows to stop when it hits the invisible ward. Of course, it may do odd things like cause the arrow to float in mid-air

I'm still trying to figure out how to tap into the perk's ability to modify settings and values so you could script such things instead. Personally, I plan on using an "IsBlocking" in a script's If Statement for my mod. Hopefully it will do what I want it to

That does sound like an interesting idea... if it works it's of course only for the deflect arrows perk and not any other perks, but it might help spooky if it works

On second part you said what you're planning to do, that's not gonna work. First of all, ''IsBlocking'' is a function which only exists for conditions (conditions you can apply to spells, perks, magic effects, quests etc) and the console. It can't be used in Papyrus Scripts and there is no Papyrus variant either. Secondly, if the function had existed, it would return true if a target was performing the block animation, not necessarily only if he actually blocked. So if an enemy would turn his back on the player and block, and the player hit him in the back, IsBlocking would return true.
Now what would work would be to attach a script to the actor using an OnHit event. One of the parameters of an OnHit event is a boolean abHitBlocked, which is true if the hit was really actually blocked.