pad an array