Here's the code to convert an array of integers into a binary tree:

```
class Node:
    def __init__(self, val):
        self.val = val
        self.left = None
        self.right = None

def array_to_bst(arr):
    if not arr:
        return None

    mid = len(arr) // 2
    root = Node(arr[mid])
    root.left = array_to_bst(arr[:mid])
    root.right = array_to_bst(arr[mid+1:])

    return root

arr = [1, 2, 3, 4]
root = array_to_bst(arr)
```

This code creates a `Node` class to represent each node in the binary tree. The `array_to_bst` function takes an input array `arr` and returns the root node of a binary tree that corresponds to the input array. 

The function first checks if the array is empty. If it is, then it returns `None`.

If the array has elements, it calculates the midpoint of the array and sets that as the value of the root node. It then recurses on the left half of the array to create the left subtree, and recurses on the right half of the array to create the right subtree. The left and right subtrees are assigned to the `root.left` and `root.right` attributes, respectively.

Finally, the function returns the root node of the binary tree.

In this particular code, the input array `[1, 2, 3, 4]` will create the binary tree:

```
    2
   / \
  1   3
       \
        4
```
Input array: [1, 2, 3, 4]
Scrivere codice per convertire un array di numeri interi in un albero binario.