Dimension witness provides a device-independent certification of the minimal dimension required to reproduce the observed data without imposing assumptions on the functioning of the devices used to generate the experimental statistics. In this paper, we provide a family of Bell expressions where Alice and Bob perform 2 n−1 and n number of dichotomic measurements respectively which serve as the device-independent dimension witnesses of Hilbert space of 2 m dimensions with m = 1, 2..2 n/2. The family of Bell expressions considered here determines the success probability of a communication game known as n-bit parity-oblivious random access code. The parity obliviousness constraint is equivalent to preparation non-contextuality assumption in an ontological model of an operational theory. For any given n ≥ 3, if such a constraint is imposed on the encoding scheme of the random-access code, then the local bound of the Bell expression reduces to the preparation noncontextual bound. We provide explicit examples for n = 4, 5 case to demonstrate that the relevant Bell expressions certify the qubit and two-qubit system, and for n = 6 case, the relevant Bell expression certifies the qubit, two-qubit and three-qubit systems. We further demonstrate the sharing of quantum preparation contextuality by multiple Bobs sequentially to examine whether number of Bobs sharing the preparation contextuality is dependent on the dimension of the system. We provide explicit example of n = 5 and 6 to demonstrate that number of Bobs sequentially sharing the contextuality remains same for any of the 2 m dimensional systems.