Is this BAD or GOOD duplicate code? and splitting Code

Hear me out first! I know duplicate code is bad, but I also read some text on "Functions should do one thing only", that's why I split them! Plus, there may be a case at some point, where I only need some of the split functions. What's bothering me is, all my split functions have a little bit of duplicate code (as seen below). Can I somehow get rid of the loops and, like, put them in a function or something? Or am I doing something completely wrong?

Thanks in advance!

function updateUIAttributePoints() {
    updateUIAttributePointsClass();
    updateUIAttributePointsEditable();
    updateUIAttributePointsFinal();
}

function updateUIAttributePointsClass() {
    attributesJSON.forEach(curAttribute => {
        const curAttributeName = curAttribute.label;

        const classAttributeInput = document.getElementById(curAttributeName + '-fixed');
        classAttributeInput.value = states.attributePoints.class[curAttributeName]
    })
}

function updateUIAttributePointsEditable() {
    attributesJSON.forEach(curAttribute => {
        const curAttributeName = curAttribute.label;

        const editableAttributeInput = document.getElementById(curAttributeName);
        editableAttributeInput.value = states.attributePoints.level[curAttributeName];
    })
}

function updateUIAttributePointsFinal() {
    attributesJSON.forEach(curAttribute => {
        const curAttributeName = curAttribute.label;

        const finalAttributeInput = document.getElementById(curAttributeName + '-total');
        finalAttributeInput.value = states.attributePoints.final[curAttributeName];
    })
}

How many English words
do you know?
Test your English vocabulary size, and measure
how many words do you know
Online Test
Powered by Examplum