Black paper layer in attic...what is its function and how do I patch it?
To this day tar paper is used as a moisture barrier under masonry products and roofing on the outside of homes. 

You correctly identified the layers from inside out, tar paper, metal lathe, stucco. To repair it you will need to remove the damaged product and replace the layers. 

Check the Internet for videos on repairing damaged stucco.

Good luck!