Resistive random access memory device scaling and integration with complementary metal-oxide-semiconductor