Problematic Engine noise with 2013 rzr 570

Was riding the other day and the engine shut down almost like a loss of electrical power. Oil was low, so we drained what was in it and filled with 2 qts of Polaris ps4, changed the filter, replaced gas and got it to restart, but there is clicking noise periodically coming from around the engine, can’t seem to figure out exactly where. Engine will idle fine but rough at higher rpm’s. The piss poor air box has come detached on more than one occasion and the filter has collapsed and let dirt/water into the air of and throttle body before, but no mud or water this time just conked out. Any advice would be helpful.