Current Controlled Output Using PWM
Yes you can use a PWM regulator suitable for LEDs to drive a solenoid but don't forget to put a flyback diode in place across the solenoid to restrict back emfs damaging the chip.

You can also use any regular adjustable buck regulator as a constant current source too. Imagine it was a linear fixed voltage regulator of 2.5V and you put a 25 ohm load across the output - the current into the regulator would be 100mA plus what the linear regulator might need internally. Basically a linear voltage regulator can act as a constant current source but, in this example wastes 250 mW in the resistor.

A lot of linear (yes I'm still talking linear at the moment) are adjustable with a sense/feedback pin that needs about 1V from a potential divider attached to the output. Well. if instead of the regular pot divider you used a LED/solenoid/load from the output and a 10 ohm resistor to ground, the adjustable regulator will attempt to put 1 volt across the 10 ohm resistor by lifting its output voltage and forcing 100mA thru the LED/solenoid/load. This time power loss is down at 100 mW.

It's the same for an adjustable buck regulator - pick one that needs a small Feedback voltage level (some as low as 0.6V) and put the load from the bucks inductor-output to the FB point and 6 ohms down to ground - you get 100mA.

However, you want to control things with PWM and this is a different deal entirely. I would seriously still consider voltage controlling the solenoid because it will have resistance that converts volts applied to current through the coil. Use a synchronous buck regulator made from two mosfets - use a driver on the mosfets to be able to control the top-switch much more easily and feed it PWM. The inductance of the solenoid should keep the current fairly "dc" in nature.