Cleaned up and improved blitting so it works with arrays