refactoring: got rid of the last dim array

Signed-off-by: Alexander Skjolden <alex@plastboks.net>