I think we can narrow it down to a problem with the hardware, software, or a poltergeist.
I actually had a similar situation of an Arduino seeming to have a life of its own. I programmed a Pro Micro to bid on Ebay listings. One day I looked at my screen and the thing was on a completely different website buying hundreds of Arduinos
i've been using arduinos for quite a few years now, and one thing is for sure, bad behaviors are always related to coding, so why don't you start with a very basic code and look how it goes first.....
I recommend that you implement activity logging. When any item is switched within your code record the time, item ID and other relevant data.
Then review the activity logs later to see when an item was switched - then try to work back through the code to determine what caused your application to switch the item at that time.
You likely have coding errors including array index range errors. Array index range errors can be very difficult to isolate and can cause apparent random incorrect operations.
I occasionally get random incorrect readings from PIR sensors - I suspect it is caused by intermittent electrical connectivity issues on my breadboard associated with rising and falling ambient temperatures, wire expansion and contraction and bad connections.