In order to save array in config database you can convert array to serialized string.
Inject Serializer Class in your constructor.
public function __construct( ...,
\Magento\Framework\Serialize\SerializerInterface $serializer) {
/*** You other code ***/
$this->serializer = $serializer;
}
Use the serialize() to convert array to serialized string.
$serializedData = $this->serializer->serialize($newdata);
$this->configWriter->save('my/path/whatever1', $serializedData, $scope = ScopeConfigInterface::SCOPE_TYPE_DEFAULT, $scopeId = 0);
You can convert the serialized string back to array wherever you wanna use the value as
$arrData = $this->serializer->unserialize($serializedData);
Hope it was helpful.
Thanks