2D materials–based homogeneous transistor-memory architecture for neuromorphic hardware