If you are using array of string then you need to define the size of the array while declaration and this can't be modified. Instead use an arraylist.
ArrayList arrLst1 = new ArrayList();
for (int m = 0; m < CANMsgIdList.Count; m++)
{
if ((CANMsgIdList[m].MsgId) == fieldFromDB)
arrList1.Add(CANMsgIdList[m].TimeStamp.Tostring());
}
Hope this should work.