Resistive switching random access memory - device scaling in 3D architecture and integration with complementary metal oxide semiconductor