Update code to simplify array section