Why are dealing that way with the array indices? I would have writeen it this way:
private void backgroundWorker1_DoWork(object sender, DoWorkEventArgs e)
{
int[] arr = new int[20];
double d = 100.0 / arr.Length;
for (int i = 0; i < arr.Length; i++)
{
arr[i] = (i+1);
Thread.Sleep(100);
int p = (int) Math.Round((i+1)* d);
backgroundWorker1.ReportProgress(p);
}
}