Replace all elements in an array arr strictly greater than k with 0. Ensure all other elements remain unchanged.