This paper presents a communications framework to overcome the connectivity constraints due to the nonavailability of the line-of-sight transmissions in indoor optical communication systems. This nonavailability can arise for various reasons, such as blockages due to physical objects, unfavorable device orientations or large distances between the transmitter and the receiving devices. The proposed system utilizes multiple intelligent reflecting surface (IRS) arrays and device-to-device (D2D) communications. The D2D communication is realized using infrared (IR) light-emitting diodes (LEDs) with limited output power for eye safety. The performance of this system depends significantly on the assignment of the mirrors in the IRS arrays to the appropriate user links and a direct combinatorial assignment search is too complex to implement. The proposed approach identifies the assignment of each mirror in the IRS arrays as a multi-armed bandit (MAB) problem, and the assignment of all the mirrors together as a combinatorial MAB (CMAB) problem. Since a simultaneous movement of all the IRS mirrors during the implementation of the CMAB algorithm could cause frequent link disruptions, a CMAB algorithm with low disruptions (CMAB-LD) is proposed to obtain the best mirror assignment with low link disruptions. Simulation results demonstrate that the proposed algorithm can provide significant improvement in reward performance and the total reward increases by more than 100% over random mirror assignments when the channels are blocked with high probabilities. In small size problems, the proposed CMAB-LD is found to achieve the global optimal solution in just a few rounds of full arm explore operations.INDEX TERMS Visible light communication, intelligent reflecting surface, device-to-device communication, multi-armed bandit.