a bit simplified array filling