Fixed matrix array index calculations