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