Spray a large skillet with cooking spray. Add butter and melt over medium-high heat. Add okra, corn, and onion; saute until barely tender, 3 to 5 minutes. Add garlic and continue to saute until all vegetables are tender, about 5 minutes more. Lower heat and add half-and-half; stir until combined. Season with salt and pepper.