Loop through a vector in ngspice
I use LTSpice, so I have no experience of this in ngspice and you may have already seen this, but have you had a look at p.266 and p.321 of the manual?  

It looks quite similar to your code above. The other option is usng LTSpice, in which this is certainly possible.
Here is an LTSpice netlist in which the length of a monolithic NMOS is swept from 1nm to 2000nm (All other values default)

* C:\Program Files\LTC\LTspiceIV\MOSFET param test 2.asc
V1 +V 0 5 Rser=0
R1 +V N001 1K
R2 N004 0 1m
R3 +V N003 500k
R4 N003 0 500k
M1 N001 N003 N004 N002 OLIMOS
R5 N002 0 1m
.model NMOS NMOS
.model PMOS PMOS
.lib C:\PROGRA~1\LTC\LTSPIC~1\lib\cmp\standard.mos
.step NMOS OLIMOS(L) 1n 2000n 100n
.model OLIMOS NMOS(KP=2e-5)
.op
.backanno
.end