renamed array -> matrix, sub_array -> sub_list

these names are more descriptive of what's actually being worked
with