You may create 2 arrays to store ids. One array for rc and another for sn
bytes32[] rc_ids; bytes32[] sn_ids;
Here is a very good pattern to store data in solidity Are there well-solved and simple storage patterns for Solidity?
Here are some simple and useful patterns in increasing order of utility.
Event logs are omitted for brevity. In practice, it's desirable to emit events for every important state change.
Simple List Using Array