TypeError thrown

Unsupported operand types: array & int