What is the replacement for the old SacIO() .fromarray() function?

Hi everyone,
I obviously need to re-write quite a few of my tools now that the old SACIO() is gone.
What I have is broken, and I haven’t quite found the right combination for reconstructing it in the new version 1.0.0 of Obspy’s SAC module.

Old code that I used for synthesizing my sac file: