Electrical characterization and modeling of 1T-1R RRAM arrays with amorphous and poly-crystalline HfO2