Is there a way to do this with Vin? I tried to look this up but all I could get was information about how and why people use the Vin pin.
No.
The Vin pin is connected to the high voltage side of the voltage regulator on the Arduino board. You cannot access it from the processor.