Referencing-in-Array Scheme for RRAM-based CIM Architecture