So, remember, we can use this collision method below.
function hasCollided(object1, object2) {
    return !(
        ((object1.y + object1.height) < (object2.y)) ||
        (object1.y > (object2.y + object2.height)) ||
        ((object1.x + object1.width) < object2.x) ||
        (object1.x > (object2.x + object2.width))
    );
}
You will need to iterate over your array objects each time you move and check to see if you have collided with all the objects on the page. Give it a try!