Arithmetic Operations Using Array Elements

 
could anyone please explain or guide me as to how I can code an expression consisting of array elements?
  1. initialize this expression, (where to place OnStart(), OnInit(), OnTick(), etc)
  2. define this expression
  3. store & access the expression's output

here is the expression I am looking for...
double percent_b_200_close[];      //percent_b_200_close[0]=(close[0]-low_bb_200[0])/(upr_bb_200[0]-low_bb_200[0])  

//+------------------------------------------------------------------+
//| Expert tick function                                             |
//+------------------------------------------------------------------+
int array_length=3;double bb_200_deviation=2.00;int bb_200_shift=0;int period_bb_200=200; double mid_bb_200[];double upr_bb_200[];double low_bb_200[];

void OnTick()
  {
      MqlRates mrate[];double close[];int DATA_=CopyRates(_Symbol,_Period,0,array_length,mrate);ArraySetAsSeries(close,true);

      ArraySetAsSeries(mid_bb_200,true); ArraySetAsSeries(upr_bb_200,true); ArraySetAsSeries(low_bb_200,true);
      int h_bb_200=iBands(_Symbol,_Period,period_bb_200,bb_200_shift,bb_200_deviation,PRICE_CLOSE);CopyBuffer(h_bb_200,0,0,array_length,mid_bb_200);CopyBuffer(h_bb_200,1,0,array_length,upr_bb_200);CopyBuffer(h_bb_200,2,0,array_length,low_bb_200);

      double percent_b_200_close[];      //percent_b_200_close[0]=(close[0]-low_bb_200[1])/(upr_bb_200[1]-low_bb_200[1])
  }
//+------------------------------------------------------------------+


Do I use a loop this task? 
Reason: